Skip to content

Commit

Permalink
Always set the parent_exit: trio.Event on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Dec 12, 2022
1 parent 304ee6c commit 2aed7dd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tractor/trionics/_mngrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ async def gather_contexts(
# deliver control once all managers have started up
await all_entered.wait()

# NOTE: order *should* be preserved in the output values
# since ``dict``s are now implicitly ordered.
yield tuple(unwrapped.values())

# we don't need a try/finally since cancellation will be triggered
# by the surrounding nursery on error.
parent_exit.set()
try:
yield tuple(unwrapped.values())
finally:
# NOTE: this is ABSOLUTELY REQUIRED to avoid
# the following wacky bug:
# <tractorbugurlhere>
parent_exit.set()


# Per actor task caching helpers.
Expand Down

0 comments on commit 2aed7dd

Please sign in to comment.