forked from goodboy/tractor
1
0
Fork 0

Merge pull request 'Fix to trionics helper `maybe_open_nursery`' (#26) from maybe_open_nursery_fix into main

Reviewed-on: goodboy/tractor#26
guille 2025-04-13 20:58:47 +00:00
commit d478dbfcfe
1 changed files with 2 additions and 1 deletions

View File

@ -70,6 +70,7 @@ async def maybe_open_nursery(
yield nursery yield nursery
else: else:
async with lib.open_nursery(**kwargs) as nursery: async with lib.open_nursery(**kwargs) as nursery:
if lib == trio:
nursery.cancel_scope.shield = shield nursery.cancel_scope.shield = shield
yield nursery yield nursery