Skip to content

Commit

Permalink
utils/asyn: Replace nest_asyncio with greenlet
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
douglas-raillard-arm authored and marcbonnici committed Sep 12, 2024
1 parent b2e19d3 commit fb4e155
Show file tree
Hide file tree
Showing 3 changed files with 554 additions and 14 deletions.
Loading

0 comments on commit fb4e155

Please sign in to comment.