ActorSystem¶
casty.ActorSystem
¶
Main entry point for creating and managing actors.
Use as an async context manager for automatic shutdown.
name
property
¶
event_stream
property
¶
scheduler
property
¶
__init__(name='casty-system', *, config=None)
¶
__make_ref__(id, deliver)
¶
__aenter__()
async
¶
__aexit__(*exc)
async
¶
spawn(behavior, name, *, mailbox=None)
¶
Spawn a root-level actor in this system.
region_ref(key, factory, *, num_shards)
¶
Not supported on plain ActorSystem — use ClusteredActorSystem.
entity_ask(ref, msg_factory, *, timeout)
async
¶
Send a message and wait for a reply (EntityGateway protocol).
ask(ref, msg_factory, *, timeout)
async
¶
Send a message and wait for a reply (request-reply pattern).
ask_or_none(ref, msg_factory, *, timeout)
async
¶
Like ask(), but returns None on timeout instead of raising.
lookup(path)
¶
Look up an actor by its path in the actor tree.
shutdown()
async
¶
Shut down the actor system, stopping all root actors.