[issue26520] asyncio.new_event_loop() hangs

Erwin Mayer report at bugs.python.org
Wed Mar 9 14:16:23 EST 2016


Erwin Mayer added the comment:

I simply need to run a coroutine synchronously (which may or may not have a loop parameter), so I tried to do it by the book. With .NET it is easy to call .Wait() on a Task (but .NET by default uses a threadpool, not a single-threaded event loop).

I am intrigued: how is it possible to achieve this at all without creating an event loop, and what kind of things are you referring to that could go wrong with my implementation?

I am a bit scared as well as if this canonical way to use loops fails for no good reason, it may imply other things in asyncio could go wrong. Unless proven otherwise (I do not rule out an implementation mistake), there could be a bug here, hence this post (StackOverflow is generally of little help when it comes to bugs).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26520>
_______________________________________


More information about the Python-bugs-list mailing list