|
17 | 17 | ''' |
18 | 18 | Actor process spawning machinery using multiple backends. |
19 | 19 |
|
20 | | -Layout |
21 | | ------- |
22 | | -- `._spawn`: the "core" supervisor machinery — spawn-method |
23 | | - registry (`SpawnMethodKey`, `_methods`, `_spawn_method`, |
24 | | - `_ctx`, `try_set_start_method`), the `new_proc` dispatcher, |
25 | | - and the cross-backend helpers `exhaust_portal`, |
26 | | - `cancel_on_completion`, `hard_kill`, `soft_kill`, |
27 | | - `proc_waiter`. |
| 20 | +- `._spawn`: cross-backend subactor-as-sub[proc|int] spawning |
| 21 | + and supervision routines. |
28 | 22 |
|
29 | 23 | Per-backend submodules (each exposes a single `*_proc()` |
30 | 24 | coroutine registered in `_spawn._methods`): |
31 | 25 |
|
32 | 26 | - `._trio`: the `trio`-native subprocess backend (default, |
33 | 27 | all platforms), spawns via `trio.lowlevel.open_process()`. |
34 | | -- `._mp`: the stdlib `multiprocessing` backends — |
35 | | - `'mp_spawn'` and `'mp_forkserver'` variants — driven by |
36 | | - the `mp.context` bound to `_spawn._ctx`. |
| 28 | +
|
| 29 | +- `._mp`: the stdlib `multiprocessing` backend variants — driven by |
| 30 | + the `mp.context` bound to `_spawn._ctx`: |
| 31 | + * `'mp_spawn'`, |
| 32 | + * `'mp_forkserver'` |
37 | 33 |
|
38 | 34 | Entry-point helpers live in `._entry`/`._mp_fixup_main`/ |
39 | 35 | `._forkserver_override`. |
40 | 36 |
|
41 | | -NOTE: to avoid circular imports, this ``__init__`` does NOT |
42 | | -eagerly import submodules. Use direct module paths like |
43 | | -``tractor.spawn._spawn`` or ``tractor.spawn._trio`` instead. |
| 37 | +NOTE: to avoid circular imports, this ``__init__`` does NOT eagerly |
| 38 | +import submodules. |
44 | 39 |
|
45 | 40 | ''' |
0 commit comments