forked from goodboy/tractor
Revert removal of `infect_asyncio` in nursery start methods
parent
0f65f9289d
commit
fa455f9c24
|
@ -22,6 +22,7 @@ from ._exceptions import RemoteActorError, ModuleNotExposed
|
|||
from ._debug import breakpoint, post_mortem
|
||||
from . import msg
|
||||
from . import _spawn
|
||||
from . import to_asyncio
|
||||
|
||||
|
||||
__all__ = [
|
||||
|
@ -39,6 +40,7 @@ __all__ = [
|
|||
'RemoteActorError',
|
||||
'ModuleNotExposed',
|
||||
'msg'
|
||||
'to_asyncio'
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ class ActorNursery:
|
|||
rpc_module_paths: List[str] = None,
|
||||
loglevel: str = None, # set log level per subactor
|
||||
nursery: trio.Nursery = None,
|
||||
infect_asyncio: bool = False,
|
||||
) -> Portal:
|
||||
loglevel = loglevel or self._actor.loglevel or get_loglevel()
|
||||
|
||||
|
@ -89,6 +90,7 @@ class ActorNursery:
|
|||
bind_addr,
|
||||
parent_addr,
|
||||
_rtv, # run time vars
|
||||
infect_asyncio=infect_asyncio,
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -101,6 +103,7 @@ class ActorNursery:
|
|||
rpc_module_paths: Optional[List[str]] = None,
|
||||
statespace: Dict[str, Any] = None,
|
||||
loglevel: str = None, # set log level per subactor
|
||||
infect_asyncio: bool = False,
|
||||
**kwargs, # explicit args to ``fn``
|
||||
) -> Portal:
|
||||
"""Spawn a new actor, run a lone task, then terminate the actor and
|
||||
|
@ -119,6 +122,7 @@ class ActorNursery:
|
|||
loglevel=loglevel,
|
||||
# use the run_in_actor nursery
|
||||
nursery=self._ria_nursery,
|
||||
infect_asyncio=infect_asyncio,
|
||||
)
|
||||
# this marks the actor to be cancelled after its portal result
|
||||
# is retreived, see logic in `open_nursery()` below.
|
||||
|
|
Loading…
Reference in New Issue