python-trio / trio-asyncio

a re-implementation of the asyncio mainloop on top of Trio
Other
187 stars 37 forks source link

Fix potential deadlock if open_loop() is cancelled #128

Closed oremanj closed 7 months ago

oremanj commented 7 months ago

Resolves #115. This also modifies the "cancel and await all asyncio tasks" logic to run even if open_loop() is cancelled or sees an exception, because that's another potential source of deadlocks -- the Trio tasks in the tasks_nursery might need to block on asyncio work as they unwind.

tjstum commented 7 months ago

Nice fix.

LGTM