Пример #1
0
 def __init__(self, targets, description=None, builtin_terminate=False):
     _AsyncioServer.__init__(self)
     self.targets = targets
     self.description = description
     self.builtin_terminate = builtin_terminate
     if builtin_terminate:
         self._terminate_request = asyncio.Event()
Пример #2
0
    def __init__(self, notifiers):
        AsyncioServer.__init__(self)
        self.notifiers = notifiers
        self._recipients = {k: set() for k in notifiers.keys()}
        self._notifier_names = {id(v): k for k, v in notifiers.items()}

        for notifier in notifiers.values():
            notifier.publish = partial(self.publish, notifier)
Пример #3
0
 def __init__(self, targets, description=None, builtin_terminate=False,
              allow_parallel=False):
     _AsyncioServer.__init__(self)
     self.targets = targets
     self.description = description
     self.builtin_terminate = builtin_terminate
     if builtin_terminate:
         self._terminate_request = asyncio.Event()
     if allow_parallel:
         self._noparallel = None
     else:
         self._noparallel = asyncio.Lock()
Пример #4
0
 def __init__(self, queue_limit=1024):
     AsyncioServer.__init__(self)
     self._queue_limit = queue_limit
     self._recipients = dict()
Пример #5
0
 def __init__(self, targets, id_parameters=None):
     _AsyncioServer.__init__(self)
     self.targets = targets
     self.id_parameters = id_parameters