aioconsole icon indicating copy to clipboard operation
aioconsole copied to clipboard

Why is InteractiveEventLoop an event loop?

Open piannucci opened this issue 8 years ago • 1 comments

Pardon my ignorance, but why is InteractiveEventLoop an event loop at all, rather than a coroutine? E.g. 66a2316703eed26b6381d5a15eec8227a931f4de.

The reason I care is because I want to use a uvloop rather than an asyncio.SelectorEventLoop.

It's not a perfect proposal -- there is some error on shutdown.

piannucci avatar May 03 '17 03:05 piannucci

Interesting... So it cannot be a loop, it probably shouldn't be a policy either, and a coroutine is not enough cause we need proper cleanup on shutdown. Maybe it should be an asynchronous context manager.

The tricky part is the apython script, since it has to patch asyncio in a way that allows the interactive console to run regardless of the loop and the policy.

vxgmichel avatar May 08 '17 16:05 vxgmichel