You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the core-rebuild epic — follows the shared rigor contract there. First card.
Component
src/mailbox.rs (~1,151 LOC). The actor's in-memory queue: the Signal enum (message + control/stop/link-died), bounded vs unbounded, backpressure (block) vs drop. The run-loop pulls from it; ActorRef pushes to it. Everything else in the runtime stands on this.
Learning & discussion
Carries Box<dyn DynMessage> — typed, in-memory, zero-serialize: this is the local tier of the two-tier model (see #66 design note). Signals are heterogeneous; the loop selects over them. We keep the local typed queue; we rebuild the impl to the god-level bar on a vetted primitive + our own Signal layer.
Existing crates
tokio::sync::mpsc (bounded/unbounded base), flume, thingbuf (bounded lock-free ring / keep-latest), async-channel, crossbeam-channel; tokio-utilCancellationToken for stop (#55). Decide the primitive for bounded-block vs ring/keep-latest.
Research — best algorithm/approach
Vyukov intrusive MPSC (1024cores), LMAX Disruptor ring-buffer + backpressure, thingbuf design. Capacity-hit returns Result, never panics (rule 4 / nexus #22). No commitment before the survey.
Part of the core-rebuild epic — follows the shared rigor contract there. First card.
Component
src/mailbox.rs(~1,151 LOC). The actor's in-memory queue: theSignalenum (message + control/stop/link-died), bounded vs unbounded, backpressure (block) vs drop. The run-loop pulls from it;ActorRefpushes to it. Everything else in the runtime stands on this.Learning & discussion
Carries
Box<dyn DynMessage>— typed, in-memory, zero-serialize: this is the local tier of the two-tier model (see #66 design note). Signals are heterogeneous; the loop selects over them. We keep the local typed queue; we rebuild the impl to the god-level bar on a vetted primitive + our ownSignallayer.Existing crates
tokio::sync::mpsc(bounded/unbounded base),flume,thingbuf(bounded lock-free ring / keep-latest),async-channel,crossbeam-channel;tokio-utilCancellationTokenfor stop (#55). Decide the primitive for bounded-block vs ring/keep-latest.Research — best algorithm/approach
Vyukov intrusive MPSC (1024cores), LMAX Disruptor ring-buffer + backpressure,
thingbufdesign. Capacity-hit returnsResult, never panics (rule 4 / nexus #22). No commitment before the survey.Testing — hard as fuck
usize::MAX), linearizability (N senders + 1 receiver, FIFO-per-sender).cargo-mutants, zero surviving mutants.Related
#19 (Zenoh channel-handler strategy — remote tier), #55 (stop/abort).