(self, receivers, *args)
Adds a new event to the processing queue.
Adds a new event to the processing queue.
Adds a new event to the processing queue .
def add_event(self, receivers, *args):
    """Adds a new event to the processing queue."""
    if not all(callable(receiver) for receiver in receivers):
      raise TypeError('Receivers are expected to be callables.')
    def event():
      for receiver in list(receivers):
        receiver(*args)
    with self._lock:
      self._events.append(event)
def add_event ( self , receivers , * args ) : if not all ( callable ( receiver ) for receiver in receivers ) : raise TypeError ( 'Receivers are expected to be callables.' ) def event ( ) : for receiver in list ( receivers ) : receiver ( * args ) with self . _lock : self . _events . append ( event )