We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 701e0b9 commit 8c81bbdCopy full SHA for 8c81bbd
1 file changed
trio_asyncio/_loop.py
@@ -417,7 +417,10 @@ async def async_main(*args):
417
418
@sync_nursery.start_soon
419
async def wait_for_sync():
420
- await loop.synchronize()
+ try:
421
+ await loop.synchronize()
422
+ except RuntimeError: # "Event loop is closed"
423
+ pass
424
sync_nursery.cancel_scope.cancel()
425
426
await loop.wait_stopped()
0 commit comments