docs: mark links/trap_exit (#3) done; refresh supervisor + README
- task.md: mark roadmap #3 done (record the resolved dedicated-inbox decision + test list), add the feature commit to the resume block, note the now-resolved trap_exit channel question, and list spawn_link under #5. - supervisor.rs: the module comment predated cancellation; rewrite it to say sibling/link/shutdown stops are cooperative (request_stop), not that one_for_all / rest_for_one / links are impossible. - README: add monitor + link rows, refresh the supervisor row and src layout, and drop restart-intensity caps from "what's not here" (shipped in #2).
This commit is contained in:
+10
-7
@@ -51,13 +51,16 @@ impl Signal {
|
||||
// whether to restart, and enforce a restart-intensity cap so a child that
|
||||
// crashes in a tight loop eventually gives up instead of spinning forever.
|
||||
//
|
||||
// What this deliberately does NOT do: forcibly terminate a running child.
|
||||
// smarm actors share a heap and rely on Drop/RAII, so async teardown of a
|
||||
// peer's stack from outside is unsound. That rules out `one_for_all` /
|
||||
// `rest_for_one` (which must stop siblings) and true bidirectional links
|
||||
// until there is a cooperative-cancellation primitive. When the intensity cap
|
||||
// trips, this supervisor simply stops restarting and returns; it does not kill
|
||||
// whatever children are still alive.
|
||||
// What this does NOT do: *forcibly* terminate a running child. smarm actors
|
||||
// share a heap and rely on Drop/RAII, so tearing down a peer's stack from
|
||||
// outside is unsound. Stopping a sibling — whether for `one_for_all` /
|
||||
// `rest_for_one`, for a propagated link death, or for the ordered shutdown
|
||||
// below — is therefore *cooperative*: `request_stop` flags the child and it
|
||||
// unwinds at its next observation point. A child with no observation points
|
||||
// (a tight loop with no `check!()`, allocation, or blocking op) cannot be
|
||||
// stopped, exactly as it cannot be preempted. When the intensity cap trips,
|
||||
// this supervisor stops restarting and tears the remaining children down in
|
||||
// reverse start order before returning.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
use crate::channel::channel;
|
||||
|
||||
Reference in New Issue
Block a user