Hello, I'm author of alternative implementation of asyncio subset for MicroPython, and some time ago I shared by concerns and criticism on how asyncio API makes it complicated to implement lightweight, memory-optimized asyncio work-alike: https://groups.google.com/forum/#!topic/python-tulip/zfMQIUcIR-0
Few days ago, with my better understanding of coroutines and asyncio, I proceeded to add some thin compatibility later to MicroPython's uasyncio to use asyncio's methods of coroutine scheduling (async() and Task()), and to my surprise, founds that there's now BaseEventLoop.create_task(coro) method (https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.BaseEventLoop.create_task) to schedule them in obvious and direct method directly against an event loop. Thank you very much for this addition! It being added means that uasyncio now can be compatible on basic level with asyncio, without suffering additional memory or runtime overheads, so thanks helping alternative asyncio implementations which may different architecture and are resource-constrained (uasyncio for example doesn't have Future class, and works directly with native Python types of routines (i.e. functions) and coroutines (i.e. generators), with heaps size of reference MicroPython implementation of 128Kb). There're more things in asyncio API which make life complicated for us (to be exact, 1 thing which is unavoidably limiting, the rest are just some improvement ideas), I hope to share them some time later, and hope for positive and productive attention to them too. -- Best regards, Paul mailto:[email protected]
