[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem
Guido van Rossum
report at bugs.python.org
Mon May 9 11:37:17 EDT 2016
Guido van Rossum added the comment:
Instead of starting a new event loop, you should figure out a way to wait
for an event in the existing loop. IIUC that loop runs in a different
thread -- I think you can solve this by using a threading.Event that you
set from a wrapper coroutine running in your event loop and waited for in
the main loop. (If you're worried about blocking the event loop just to
acquire the threading lock that's part of threading.Event, you can use
run_in_executor().
Good luck!
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26969>
_______________________________________
More information about the Python-bugs-list
mailing list