我的设置是pythontor非典服务器,它用ThreadPoolExecutor异步处理任务。在某些情况下,任务可能会变成无限循环。使用with_timeout装饰器,我成功地捕获了超时异常,并将错误结果返回给客户端。问题是任务仍然在后台运行。如何能够阻止任务在ThreadPoolExecutor中运行?或者可以取消Future?下面是再现问题的代码。运行与龙卷风4和concurrent.futures库的代码,然后转到
from tornado.concurrent import run_on_exec
这是我之前question的后续版本。 文件的结构如下所示。我必须使用python -m bokeh_module.bokeh_sub_module从顶层目录运行脚本。not showing└── image.png # not showing either bokeh_sub_module.py正在使用独立的bokeh我得到了这个WARNING:tornado.access:404 GET /favicon.ico (::1) 0.50ms,我不确定这是