To create a working actor controller, subclasses typically will
have to, at a minimum, set ActorClass and implement
_current_actor_id.
ActorClass = <class 'parley.actor.AbstractActor'>
def _create_link(self, a, b):
def _current_actor(self):
def _current_actor_id(self):
Return the current actor ID.
Subclasses can implement this function by, for example,
storing the current actor ID in threadlocal storage.
def _current_actor_proxy(self):
def _quit(self, actor_id):
def _remove_link(self, a, b):
def _spawn(self, target, args, kwargs, link=False):
def alert_exception(self, origin_id, e):
def alert_quit(self, origin_id):
def register(self, actor_proxy, name):
def schedule(self):
Yield control of execution.
Cooperatively scheduled execution models
will have to override this function.
def send(self, target_id, msg):
def send_signal(self, target_id, msg):
def shutdown(self):
Send quit signals to every actor and attempt to shut down
the node.
This function is called when any actor raises SystemExit. It
does not attempt to force actors to shut down: if an actor
does not call recv(), or if it is trapping signals and not
handling them properly, it will not shut down.
def spawn(self, target, *args, **kwargs):
def spawn_link(self, target, *args, **kwargs):
def unlink(self, target):
def unregister(self, name):