diff --git a/ai/prompt-io/prompts/subints_spawner.md b/ai/prompt-io/prompts/subints_spawner.md index 4911a930..08d38684 100644 --- a/ai/prompt-io/prompts/subints_spawner.md +++ b/ai/prompt-io/prompts/subints_spawner.md @@ -24,7 +24,7 @@ Part of this work should include, is happening under the hood with how cpython implements subints. * default configuration should encourage state isolation as with - with subprocs, but explicit public escape hatches to enable rigorously + subprocs, but explicit public escape hatches to enable rigorously managed shm channels for high performance apps. - all tests should be (able to be) parameterized to use the new diff --git a/tractor/spawn/__init__.py b/tractor/spawn/__init__.py index 3f363889..cb9be559 100644 --- a/tractor/spawn/__init__.py +++ b/tractor/spawn/__init__.py @@ -29,7 +29,7 @@ coroutine registered in `_spawn._methods`): - `._mp`: the stdlib `multiprocessing` backend variants — driven by the `mp.context` bound to `_spawn._ctx`: * `'mp_spawn'`, - * `'mp_forkserver'` + * `'mp_forkserver'` Entry-point helpers live in `._entry`/`._mp_fixup_main`/ `._forkserver_override`. diff --git a/tractor/spawn/_trio.py b/tractor/spawn/_trio.py index bdb97c75..3b425256 100644 --- a/tractor/spawn/_trio.py +++ b/tractor/spawn/_trio.py @@ -246,7 +246,11 @@ async def trio_proc( await proc.wait() await debug.maybe_wait_for_debugger( - child_in_debug=get_runtime_vars().get( + # NOTE: use the child's `_runtime_vars` + # (the fn-arg dict shipped via `SpawnSpec`) + # — NOT `get_runtime_vars()` which returns + # the *parent's* live runtime state. + child_in_debug=_runtime_vars.get( '_debug_mode', False ), header_msg=(