Correct `to_actor.run()` target guidance
Target validation moved to a follow-up branch, so the guide should not claim unstable callable forms are rejected before actor startup. Describe module-global functions and `functools.partial()` wrappers as portable stable-address forms without promising absent enforcement. (this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`))wkt/to_actor_subpkg
parent
5c4859860a
commit
ce38cb6f0e
|
|
@ -126,10 +126,10 @@ A few details worth knowing:
|
||||||
``name='something_cuter'``.
|
``name='something_cuter'``.
|
||||||
- the function's module is auto-added to the child's
|
- the function's module is auto-added to the child's
|
||||||
``enable_modules`` allowlist.
|
``enable_modules`` allowlist.
|
||||||
- the target must be a module-global async function, or a
|
- targets cross IPC as ``module:name`` references, so portable calls
|
||||||
``functools.partial`` thereof. Nested functions, methods and callable
|
use module-global async functions or ``functools.partial`` objects
|
||||||
objects have no stable ``module:name`` RPC address and are rejected
|
wrapping them. Nested functions, methods and callable objects do not
|
||||||
before actor startup.
|
provide that stable address.
|
||||||
- target arguments are positional; use ``functools.partial()``
|
- target arguments are positional; use ``functools.partial()``
|
||||||
to bind target keyword arguments. Keywords passed directly to
|
to bind target keyword arguments. Keywords passed directly to
|
||||||
``run()`` configure actor placement and spawning.
|
``run()`` configure actor placement and spawning.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue