Part of the core-rebuild epic — follows the shared rigor contract there.
Component
src/actor/actor_ref.rs (~3,008 LOC — the largest file). ActorRef, WeakActorRef, Recipient/ReplyRecipient, tell/ask entry points, strong/weak ref counting.
Learning & discussion
The handle you hold to talk to an actor. Last strong-ref drop → actor stops. Recipient is a type-erased handle for heterogeneous fan-in. At 3k LOC this file is doing too much — split into focused modules as part of the rebuild (ref + counting + recipient + entry).
Existing crates
Arc/Weak (std) — evaluate; possibly triomphe for a leaner Arc.
Research — best algorithm/approach
Strong/weak lifecycle → shutdown semantics; ref-count-driven stop; type-erasure for Recipient without vtable bloat.
Testing — hard as fuck
Lifecycle (last strong ref drop stops actor; weak upgrade after stop → None), linearizability (concurrent tell/ask/drop, snapshot assertions), defensive boundary. DST over ref drop/upgrade races. Mutation: cargo-mutants, zero survivors.
Part of the core-rebuild epic — follows the shared rigor contract there.
Component
src/actor/actor_ref.rs(~3,008 LOC — the largest file).ActorRef,WeakActorRef,Recipient/ReplyRecipient, tell/ask entry points, strong/weak ref counting.Learning & discussion
The handle you hold to talk to an actor. Last strong-ref drop → actor stops.
Recipientis a type-erased handle for heterogeneous fan-in. At 3k LOC this file is doing too much — split into focused modules as part of the rebuild (ref + counting + recipient + entry).Existing crates
Arc/Weak(std) — evaluate; possiblytriomphefor a leaner Arc.Research — best algorithm/approach
Strong/weak lifecycle → shutdown semantics; ref-count-driven stop; type-erasure for
Recipientwithout vtable bloat.Testing — hard as fuck
Lifecycle (last strong ref drop stops actor; weak upgrade after stop → None), linearizability (concurrent tell/ask/drop, snapshot assertions), defensive boundary. DST over ref drop/upgrade races. Mutation:
cargo-mutants, zero survivors.