From 25ff195c17fac25207711fa1fdd34a28d9079808 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 7 Jul 2025 10:37:02 -0400 Subject: [PATCH] Use collapser around `root_tn` in `async_main()` Replacing yet another loose-eg-flag. Also toss in a todo to maybe use the unmasker around the `open_root_actor()` body. --- tractor/_root.py | 5 ++++- tractor/_runtime.py | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tractor/_root.py b/tractor/_root.py index d43012fe..364e4563 100644 --- a/tractor/_root.py +++ b/tractor/_root.py @@ -480,8 +480,11 @@ async def open_root_actor( async with ( collapse_eg(), trio.open_nursery() as root_tn, - ): + # XXX, finally-footgun below? + # -> see note on why shielding. + # maybe_raise_from_masking_exc(), + ): # `_runtime.async_main()` creates an internal nursery # and blocks here until any underlying actor(-process) # tree has terminated thereby conducting so called diff --git a/tractor/_runtime.py b/tractor/_runtime.py index 9b04c32b..922f5daa 100644 --- a/tractor/_runtime.py +++ b/tractor/_runtime.py @@ -1484,9 +1484,8 @@ async def async_main( ipc_server: _server.IPCServer async with ( - trio.open_nursery( - strict_exception_groups=False, - ) as service_nursery, + collapse_eg(), + trio.open_nursery() as service_nursery, _server.open_ipc_server( parent_tn=service_nursery, stream_handler_tn=service_nursery,