From d9803ca906baab7ef6d9394e7b791c8756d38b62 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 24 Jan 2020 00:47:01 -0500 Subject: [PATCH] Be explicit with the real name for trip --- tractor/__init__.py | 4 ++-- tractor/_spawn.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tractor/__init__.py b/tractor/__init__.py index aef3821..a677c59 100644 --- a/tractor/__init__.py +++ b/tractor/__init__.py @@ -102,8 +102,8 @@ def run( _default_arbiter_host, _default_arbiter_port), # either the `multiprocessing` start method: # https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods - # OR `trio-run-in-process` (the new default). - start_method: str = 'trip', + # OR `trio_run_in_process` (the new default). + start_method: str = 'trio_run_in_process', **kwargs, ) -> Any: """Run a trio-actor async function in process. diff --git a/tractor/_spawn.py b/tractor/_spawn.py index b51f1f8..f35677c 100644 --- a/tractor/_spawn.py +++ b/tractor/_spawn.py @@ -59,7 +59,7 @@ def try_set_start_method(name: str) -> mp.context.BaseContext: # no Windows support for trip yet (afaik) if platform.system() != 'Windows': - allowed += ['trip'] + allowed += ['trio_run_in_process'] if name not in allowed: raise ValueError( @@ -153,7 +153,7 @@ async def new_proc( bind_addr: Tuple[str, int], parent_addr: Tuple[str, int], begin_wait_phase: trio.Event, - use_trip: bool = False, + use_trio_run_in_process: bool = False, task_status: TaskStatus[Portal] = trio.TASK_STATUS_IGNORED ) -> None: """Create a new ``multiprocessing.Process`` using the @@ -162,7 +162,7 @@ async def new_proc( cancel_scope = None async with trio.open_nursery() as nursery: - if use_trip or _spawn_method == 'trip': + if use_trio_run_in_process or _spawn_method == 'trio_run_in_process': # trio_run_in_process async with trio_run_in_process.open_in_process( subactor._trip_main,