Use collapse in `._root.open_root_actor()` too
Seems to add one more cancellation suite failure as well as now cause the discovery test to error instead of fail?cluster_api_egs_conflict
							parent
							
								
									9295af929c
								
							
						
					
					
						commit
						f23ee3cd22
					
				| 
						 | 
				
			
			@ -64,6 +64,7 @@ from ._addr import (
 | 
			
		|||
)
 | 
			
		||||
from .trionics import (
 | 
			
		||||
    is_multi_cancelled,
 | 
			
		||||
    collapse_eg,
 | 
			
		||||
)
 | 
			
		||||
from ._exceptions import (
 | 
			
		||||
    RuntimeFailure,
 | 
			
		||||
| 
						 | 
				
			
			@ -199,7 +200,11 @@ async def open_root_actor(
 | 
			
		|||
 | 
			
		||||
) -> Actor:
 | 
			
		||||
    '''
 | 
			
		||||
    Runtime init entry point for ``tractor``.
 | 
			
		||||
    Initialize the `tractor` runtime by starting a "root actor" in
 | 
			
		||||
    a parent-most Python process.
 | 
			
		||||
 | 
			
		||||
    All (disjoint) actor-process-trees-as-programs are created via
 | 
			
		||||
    this entrypoint.
 | 
			
		||||
 | 
			
		||||
    '''
 | 
			
		||||
    # XXX NEVER allow nested actor-trees!
 | 
			
		||||
| 
						 | 
				
			
			@ -442,10 +447,17 @@ async def open_root_actor(
 | 
			
		|||
            )
 | 
			
		||||
 | 
			
		||||
            # start the actor runtime in a new task
 | 
			
		||||
            async with trio.open_nursery(
 | 
			
		||||
                strict_exception_groups=False,
 | 
			
		||||
                # ^XXX^ TODO? instead unpack any RAE as per "loose" style?
 | 
			
		||||
            ) as nursery:
 | 
			
		||||
            async with (
 | 
			
		||||
 | 
			
		||||
                # ?? TODO, causes test failures..
 | 
			
		||||
                # - advanced_faults
 | 
			
		||||
                # - cancellation
 | 
			
		||||
                # - clustering
 | 
			
		||||
                #
 | 
			
		||||
                collapse_eg(),
 | 
			
		||||
                trio.open_nursery() as root_tn,
 | 
			
		||||
                # trio.open_nursery(strict_exception_groups=False) as root_tn,
 | 
			
		||||
            ):
 | 
			
		||||
 | 
			
		||||
                # ``_runtime.async_main()`` creates an internal nursery
 | 
			
		||||
                # and blocks here until any underlying actor(-process)
 | 
			
		||||
| 
						 | 
				
			
			@ -455,7 +467,7 @@ async def open_root_actor(
 | 
			
		|||
                # "actor runtime" primitives are SC-compat and thus all
 | 
			
		||||
                # transitively spawned actors/processes must be as
 | 
			
		||||
                # well.
 | 
			
		||||
                await nursery.start(
 | 
			
		||||
                await root_tn.start(
 | 
			
		||||
                    partial(
 | 
			
		||||
                        async_main,
 | 
			
		||||
                        actor,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue