1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-04-14 13:50:03 +01:00

3 Commits

Author SHA1 Message Date
Douglas Raillard
f02a0a38b0 utils/asyn: Fix cancellation of async tasks in map_concurrently()
Ensure the canceled tasks are awaited, so cancellation actually takes
place.
2025-03-21 16:31:13 -05:00
Douglas Raillard
fb4e155696 utils/asyn: Replace nest_asyncio with greenlet
Provide an implementation of re-entrant asyncio.run() that is less
brittle than what greenback provides (e.g. no use of ctypes to poke
extension types).

The general idea of the implementation consists in treating the executed
coroutine as a generator, then turning that generator into a generator
implemented using greenlet. This allows a nested function to make the
top-level parent yield values on its behalf, as if every call was
annotated with "yield from".
2024-09-12 17:59:19 -05:00
Douglas Raillard
1d6a007bad tests: Add tests for nested async support 2024-09-12 17:59:19 -05:00