Expand description
§Rill Core Actor — actor model infrastructure
A lightweight, domain-agnostic actor model for lock-free message passing. Actors are single-threaded: handler is created and drained on the same thread.
§Key types
| Type | Role |
|---|---|
Actor<M> | Handler + mailbox — drained in-place (no separate thread) |
ActorRef<M> | Thread-safe handle to send messages to an actor |
ActorSystem | Named actor registry, dead letters, spawn(), spawn_detached() |
§Architecture
// Handler drained inline (Graph, Rack):
system.spawn(name, handler) → Actor<M> → actor.drain() on caller's thread
// Handler created & drained inside a new thread (Servo, factory modules):
system.spawn_detached(name, make_handler, ms) → ActorRef<M>
└── thread::spawn: handler = make_handler() → actor.drain() loop