コード例 #1
0
ファイル: proxy.py プロジェクト: okoye/pykka
 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 = {}
コード例 #2
0
ファイル: proxy.py プロジェクト: garindra/pykka
 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 = {}
コード例 #3
0
 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 = {}
コード例 #4
0
ファイル: actor.py プロジェクト: zombiecalypse/pykka
    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)
コード例 #5
0
    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)