Skip to main content

Crate rill_core_actor

Crate rill_core_actor 

Source
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

TypeRole
Actor<M>Handler + mailbox — drained in-place (no separate thread)
ActorRef<M>Thread-safe handle to send messages to an actor
ActorSystemNamed 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

Structs§

Actor
ActorRef
ActorSystem