pfalcon / pycopy-lib

Standard library of the Pycopy project, minimalist and light-weight Python language implementation
https://github.com/pfalcon/pycopy
Other
246 stars 70 forks source link

Uasyncio equivalent for `asyncio.gather`/`asyncio.wait`? #74

Open GimmickNG opened 2 years ago

GimmickNG commented 2 years ago

I'm really confused by the uasyncio module, all the documentation I see is either out of date or just plain inapplicable.

For example, https://pycopy.readthedocs.io/en/latest/library/uasyncio.html says that uasyncio.run, uasyncio.create_task, uasyncio.current_task, uasyncio.gather exists, when in reality they don't. Nor do the Event, Lock and ThreadSafeFlag class exist either.

Apart from using run_forever and run_until_complete, is this library usable? I want to wait on 2 tasks created like uasyncio.gather, is this even possible right now?

pmp-p commented 2 years ago

I'm really confused by the uasyncio module, all the documentation I see is either out of date or just plain inapplicable.

Hi, why not offer a PR if you see something that can/should be fixed in docs ?

asyncio.gather should not be very hard to add yourself, after all it's just awaiting all elements of a list until it's empty no ?