docs: the root-exit sweep does not reach children of a still-live parent
The sweep's trace comment claimed a forgotten actor "costs only a slot, never a hung run". Not so for a non-trapping child of a parent still live at sweep time: it is skipped, stopping the parent does not reach it, and if it loops until told otherwise the run never ends (the try_spawn race test hit this). Comment corrected; the ROADMAP item on post-sweep spawns now covers existing children too. Behaviour unchanged.
This commit is contained in:
+7
-1
@@ -304,7 +304,13 @@ outright — `join` what you need finished. No forcing sweep follows.
|
||||
kill); OTP would deliver a trappable `killed`. Chosen for boundedness.
|
||||
- A root-exit shutdown reaches only actors live *at that instant*; a
|
||||
non-trapping forest root that spawns before it unwinds leaves that spawn
|
||||
to itself (Erlang: an unlinked spawn is nobody's child).
|
||||
to itself (Erlang: an unlinked spawn is nobody's child). The same holds
|
||||
for children it already had: they sit under a live parent at sweep time,
|
||||
so they are skipped, and stopping the parent does not reach them. A child
|
||||
that loops until told otherwise then keeps the run alive (seen as a hang in
|
||||
`try_spawn`'s race test whenever its root panicked mid-race). Closing it
|
||||
means sweeping a forest root's live children when it finalizes after root
|
||||
exit; that changes teardown semantics, so it is not done yet.
|
||||
- **Supervisor start *order* is not start *readiness*.** `start_child`
|
||||
spawns and moves straight on, so an earlier child is merely *scheduled*,
|
||||
not initialised, when a later sibling starts. A later child that resolves
|
||||
|
||||
Reference in New Issue
Block a user