One mailbox, one thread of control
An actor is an isolated unit that owns private state and a mailbox. It processes one message at a time, in arrival order, so its own state never sees concurrent access. There are no shared variables to lock because nothing is shared.
What an actor can do
On each message an actor may:
- Send messages to other actors it knows.
- Create new actors.
- Change its own behavior for the next message.
Because state lives behind the mailbox, the only way to affect an actor is to send it a message. This turns synchronization into ordinary queuing.
Supervision
Actors form trees. A supervisor watches its children and decides what to do when one crashes: restart it, stop it, or escalate. This let it crash philosophy keeps faults local instead of corrupting shared memory.
Trade offs
Single message processing removes races but caps a single actor throughput, so hot actors become bottlenecks. The fix is to shard work across many actors.
Key idea
An actor owns private state and processes one mailbox message at a time, so concurrency reduces to message passing instead of locking.