diff --git a/tractor/_portal.py b/tractor/_portal.py index f5a6683..7fbf69b 100644 --- a/tractor/_portal.py +++ b/tractor/_portal.py @@ -533,6 +533,10 @@ async def open_portal( async with maybe_open_nursery( tn, shield=shield, + strict_exception_groups=False, + # ^XXX^ TODO? soo roll our own then ?? + # -> since we kinda want the "if only one `.exception` then + # just raise that" interface? ) as tn: if not channel.connected(): diff --git a/tractor/trionics/_broadcast.py b/tractor/trionics/_broadcast.py index 154b037..2286e70 100644 --- a/tractor/trionics/_broadcast.py +++ b/tractor/trionics/_broadcast.py @@ -15,7 +15,7 @@ # along with this program. If not, see . ''' -``tokio`` style broadcast channel. +`tokio` style broadcast channel. https://docs.rs/tokio/1.11.0/tokio/sync/broadcast/index.html ''' diff --git a/tractor/trionics/_mngrs.py b/tractor/trionics/_mngrs.py index fd224d6..9a5ed15 100644 --- a/tractor/trionics/_mngrs.py +++ b/tractor/trionics/_mngrs.py @@ -57,6 +57,8 @@ async def maybe_open_nursery( shield: bool = False, lib: ModuleType = trio, + **kwargs, # proxy thru + ) -> AsyncGenerator[trio.Nursery, Any]: ''' Create a new nursery if None provided. @@ -67,7 +69,7 @@ async def maybe_open_nursery( if nursery is not None: yield nursery else: - async with lib.open_nursery() as nursery: + async with lib.open_nursery(**kwargs) as nursery: nursery.cancel_scope.shield = shield yield nursery @@ -143,9 +145,14 @@ async def gather_contexts( 'Use a non-lazy iterator or sequence type intead!' ) - async with trio.open_nursery() as n: + async with trio.open_nursery( + strict_exception_groups=False, + # ^XXX^ TODO? soo roll our own then ?? + # -> since we kinda want the "if only one `.exception` then + # just raise that" interface? + ) as tn: for mngr in mngrs: - n.start_soon( + tn.start_soon( _enter_and_wait, mngr, unwrapped,