[Async-sig] Inadvertent layering of synchronous code as frameworks adopt asyncio

Glyph glyph at twistedmatrix.com
Mon Mar 25 20:52:03 EDT 2019


> Allowing reentrant calls to the same loop is not a good idea IMO. At best, you'll need to carefully ensure that the event loop and task implementations are themselves reentrancy-safe (including the C accelerators and third parties like uvloop?), and then it just invites subtle issues in the applications built on top of it. I don't think there's a good reason to allow or support this (and nest_asyncio should be heavily discouraged). I do, however, think that PBP is a good enough reason to allow opt-in use of multiple event loops nested inside each other (maybe something on the EventLoopPolicy for configuration?).  

+1 to all of this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/async-sig/attachments/20190325/2e072e4b/attachment.html>


More information about the Async-sig mailing list