ipython / ipython/ipykernel

Very slow kernel (~30s) restart with asyncio and ProcessPoolExecutor

未关闭
#291 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
734
派生
412
平均合并
1 天 5 小时
30 天内合并 PR
8

描述

Thanks to the great work by @minrk in https://github.com/ipython/ipykernel/pull/290 restarting a kernel cleans everything up correctly.

However, when the `ProcessPoolExecutor` is still running the kernel restart is very slow (~30 seconds vs 2 seconds normally).

```python
import concurrent.futures
import asyncio

executor = concurrent.futures.ProcessPoolExecutor()
ioloop = asyncio.get_event_loop()

def simple_function(x):
import time
time.sleep(10000)
return x

tsk = ioloop.run_in_executor(executor, simple_function, 0)
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。