This adds support for wait from asyncio in CPython. wait is helpful because it allows for specifying the return_when behavior - so you can run multiple async and get a value back when the first succeeds or raises, or when all have completed. It also makes the timeout an optional behavior.
In an attempt to keep the weight of this change low, the other functions for waiting in funcs.py have been refactored to reuse this new function as a basis
This adds support for wait from asyncio in CPython.
wait
is helpful because it allows for specifying thereturn_when
behavior - so you can run multiple async and get a value back when the first succeeds or raises, or when all have completed. It also makes the timeout an optional behavior.In an attempt to keep the weight of this change low, the other functions for waiting in
funcs.py
have been refactored to reuse this new function as a basis