Add draft code for waiting on all nurseries in root

context_caching
Tyler Goodlet 2021-12-15 14:27:01 -05:00
parent f617da6ff1
commit 213447008b
1 changed files with 8 additions and 0 deletions

View File

@ -215,6 +215,14 @@ async def open_root_actor(
raise
finally:
# NOTE: not sure if we'll ever need this but it's
# possibly better for even more determinism?
# logger.cancel(f'Waiting on {len(nurseries)} nurseries in root..')
# nurseries = actor._actoruid2nursery.values()
# async with trio.open_nursery() as tempn:
# for an in nurseries:
# tempn.start_soon(an.exited.wait)
logger.cancel("Shutting down root actor")
await actor.cancel()
finally: