The Standard Library as Architecture
Arc<Config>shares live configuration without transferring ownership to every worker.Arc<[Event]>is an immutable, cheaply cloned action snapshot.HashMap<Id, Job>owns the supervisor registry;Idavoids exposing task internals as identity.AtomicBoolrepresents simple cross-task policy such as paused, queued, and running, while compound process state remains single-owner data.OnceLock<CriticalError>lets an error hook upgrade one runtime error exactly once without returning the hook object.DurationandInstantmake debounce and escalation deadlines monotonic.
The crucial borrowing rule is that async workers own their inputs. A handler
gets cloned job handles and an Arc event batch, not references into the action
worker’s mutable registry. A spawn hook temporarily borrows the command before
process creation; it cannot retain that mutable borrow across the process
lifetime.