Registry which provides easy access to all running actors.
Contains global state, but should be thread-safe.
messageto all actors of the specified
target_classis specified, the message is broadcasted to all actors.
message (any) – the message to send
target_class (class or class name) – optional actor class to broadcast the message to
ActorReffor all running actors of the given class, or of any subclass of the given class.
actor_class (class) – actor class, or any superclass of the actor
ActorReffor all running actors of the given class name.
actor_class_name (string) – actor class name
Get an actor by its universally unique URN.
actor_urn (string) – actor URN
Noneif not found
ActorRefin the registry.
This is done automatically when an actor is started, e.g. by calling
pykka.ActorRef) – reference to the actor to register
Stop all running actors.
timeoutworks as for
True, the actors are guaranteed to be stopped in the reverse of the order they were started in. This is helpful if you have simple dependencies in between your actors, where it is sufficient to shut down actors in a LIFO manner: last started, first stopped.
If you have more complex dependencies in between your actors, you should take care to shut them down in the required order yourself, e.g. by stopping dependees from a dependency’s
If not blocking, a list with a future for each stop action. If blocking, a list of return values from