Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python waitress-杀死非活动的连接和线程_Python_Python 3.x_Waitress - Fatal编程技术网

python waitress-杀死非活动的连接和线程

python waitress-杀死非活动的连接和线程,python,python-3.x,waitress,Python,Python 3.x,Waitress,我有一个女服务员服务器连接到falcon API: from waitress import serve import myserver serve(myserver.api, host='0.0.0.0', channel_timeout=20, cleanup_interval=20, port=8001) 文档说我可以使用channel\u timeout使连接处于非活动状态,并使用cleanup\u interval在指定的秒数后终止非活动连接 然而,就我而言,这并没有发生 我有一个需

我有一个女服务员服务器连接到falcon API:

from waitress import serve
import myserver
serve(myserver.api, host='0.0.0.0', channel_timeout=20, cleanup_interval=20, port=8001)
文档说我可以使用
channel\u timeout
使连接处于非活动状态,并使用
cleanup\u interval
在指定的秒数后终止非活动连接

然而,就我而言,这并没有发生

我有一个需要花费大量时间的API——但只是有时候。在这种情况下,我只想杀死那个特定的线程

PS:我不想增加线程数,默认的4个就可以了