def __init__(self, actor_ref, attr_path=None): if not actor_ref.is_alive(): raise _ActorDeadError('%s not found' % actor_ref) self.actor_ref = actor_ref self._attr_path = attr_path or tuple() self._known_attrs = None self._actor_proxies = {} self._callable_proxies = {}
def __init__(self, actor_ref, attr_path=None): if not actor_ref.is_alive(): raise _ActorDeadError('%s not found' % actor_ref) self.actor_ref = actor_ref # pylint: disable = W0212 self._actor = actor_ref._actor # pylint: enable = W0212 self._attr_path = attr_path or tuple() self._known_attrs = self._get_attributes() self._actor_proxies = {} self._callable_proxies = {}
def send_one_way(self, message): """ Send message to actor without waiting for any response. Will generally not block, but if the underlying queue is full it will block until a free slot is available. :param message: message to send :type message: picklable dict :raise: :exc:`pykka.ActorDeadError` if actor is not available :return: nothing """ if not self.is_alive(): raise _ActorDeadError('%s not found' % self) self.actor_inbox.put(message)
def tell(self, message): """ Send message to actor without waiting for any response. Will generally not block, but if the underlying queue is full it will block until a free slot is available. :param message: message to send :type message: picklable dict :raise: :exc:`pykka.ActorDeadError` if actor is not available :return: nothing """ if not self.is_alive(): raise _ActorDeadError('%s not found' % self) self.actor_inbox.put(message)