You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached example shows that asyncio.get_event_loop still returns parent process' event loop in some cases. It appears that the fix in issue bpo-29703 was incomplete:
PARENT PID: 21947, LOOP: <_UnixSelectorEventLoop running=True closed=False debug=False> at 0x7f0fbe7cfd68
WORKER PID: 21948, LOOP: <_UnixSelectorEventLoop running=True closed=False debug=False> at 0x7f0fbe7cfd68
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib64/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "test.py", line 13, in workerreturn loop.run_until_complete(worker_coro())
File "/usr/lib64/python3.6/asyncio/base_events.py", line 454, in run_until_completeself.run_forever()
File "/usr/lib64/python3.6/asyncio/base_events.py", line 408, in run_foreverraiseRuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "test.py", line 25, in <module>
loop.run_until_complete(main())
File "/usr/lib64/python3.6/asyncio/base_events.py", line 466, in run_until_completereturn future.result()
File "test.py", line 21, in mainreturnawait loop.run_in_executor(executor, worker)
RuntimeError: This event loop is already running
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: