回答編集履歴
1
run_in_executorの間違った用法を修正。
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
```python
|
27
27
|
async def main():
|
28
28
|
loop = asyncio.get_event_loop()
|
29
|
-
fut = loop.run_in_executor(blocker, 5)
|
29
|
+
fut = loop.run_in_executor(None, blocker, 5)
|
30
30
|
try:
|
31
31
|
await asyncio.wait_for(fut, timeout=3)
|
32
32
|
except: ... # (省略)
|