This commit is contained in:
grossmj committed 2019-11-11 12:44:31 +08:00
1 parent 2fd4b2cbc8
commit a98fc2d308
6 files changed
+10 -9

No files matched your search

+1 -3
View File
@@ -22,8 +22,6 @@ import sys
import os
import threading
from asyncio.futures import CancelledError
async def wait_run_in_executor(func, *args, **kwargs):
"""
@@ -56,7 +54,7 @@ async def cancellable_wait_run_in_executor(func, *args, **kwargs):
kwargs['stopped_event'] = stopped_event
try:
await wait_run_in_executor(func, *args, **kwargs)
except CancelledError:
except asyncio.CancelledError:
stopped_event.set()