From acf65682756d2815ff7bb5de0c69e719b7dbb56e Mon Sep 17 00:00:00 2001 From: goodboy Date: Fri, 10 Apr 2026 11:29:34 -0400 Subject: [PATCH] Clarify `inherit_parent_main` docstring scope Note the opt-out only applies to the trio spawn backend; `multiprocessing` `spawn`/`forkserver` reconstruct `__main__` via stdlib bootstrap. Review: PR #438 (Copilot) https://github.com/goodboy/tractor/pull/438 (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tractor/runtime/_supervise.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tractor/runtime/_supervise.py b/tractor/runtime/_supervise.py index a1675132..6d2d573f 100644 --- a/tractor/runtime/_supervise.py +++ b/tractor/runtime/_supervise.py @@ -207,9 +207,12 @@ class ActorNursery: Start a (daemon) actor: an process that has no designated "main task" besides the runtime. - Pass ``inherit_parent_main=False`` to keep this child on its own - bootstrap module instead of re-running the parent's ``__main__`` - during startup. + Pass ``inherit_parent_main=False`` to keep this child on its + own bootstrap module for the trio spawn backend instead of + applying the parent ``__main__`` re-exec fixup during startup. + This does not affect ``multiprocessing`` ``spawn`` or + ``forkserver`` which reconstruct the parent's ``__main__`` as + part of their normal stdlib bootstrap. ''' __runtimeframe__: int = 1 # noqa