parley/proxy.py - reference and communice with spawned actors.
class ActorProxy(__builtin__.object):
def _send_signal(self, value, sender):
def _with_link(self, sender, action):
Make a one-way link to the given actor that exists for the duration of the call to action().def call(self, msg_name, sender, *args, **kwargs):
Sends the message (msg_name, sender, args, kwargs) to this actor, then hooks into the recv() function of the calling actor to block for an RPC response from this actor.def send(self, msg_name, sender, *args, **kwargs):
Sends the message (msg_name, sender, args, kwargs) to this actor.def send_raw(self, msg):
Send this actor an arbitrary object as a message. Use this function to send messages that are not 4-tuples.
class NoSuchActor(parley.RPCException):
This exception is raised upon sending a message to an actor that does not exist.
class RPCReplyException(parley.RPCException):
This exception is raised by the .call() method of ActorProxy objects if the target actor responds with a message that is not parseable as an RPC reply.