Add another consumer from a :class:`Consumer` instance.
7938
def add_consumer(self, consumer):
        """"""
        consumer.backend = self.backend
        self.consumers.append(consumer)
1266039
def add(self, a, b):
        
        self.send_add(a, b)
        return self.recv_add()
961007
public void addConsumer(DispatchableConsumerPoint lcp)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "addConsumer", lcp);

    // WARNING: We mustn't hold the LCP lock of the consumer at this point
    synchronized(consumerList)
    {
      consumerList.add(lcp);
    }
    
    if(TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addConsumer");

  }
870619
def Add(self, other):
    """"""
    new_descriptors = []
    for desc in self.descriptors + other.descriptors:
      if desc not in new_descriptors:
        new_descriptors.append(desc)

    return TypeDescriptorSet(*new_descriptors)
870220
def add_class(cls, *args):
        
        for cls2 in args:
            cls.classes[cls2.__name__] = cls2
909824
def add_parent(self, parent):
        
        parent.add_child(self)
        self.parent = parent
        return parent
844566
def _update_consumers(self):
        
        # Do we need to start more consumers.
        consumer_to_start = \
            min(max(self.number_of_consumers - len(self._consumers), 0), 2)
        for _ in range(consumer_to_start):
            consumer = Consumer(self.rpc_queue)
            self._start_consumer(consumer)
            self._consumers.append(consumer)

        # Check that all our consumers are active.
        for consumer in self._consumers:
            if consumer.active:
                continue
            self._start_consumer(consumer)
            break

        # Do we have any overflow of consumers.
        self._stop_consumers(self.number_of_consumers)
811765
def add(self, spec):
        
        for limit in spec.limit_to:
            if limit not in self.limit_to:
                self.limit_to.append(limit)
945040
def extend(self, other):
        """"""
        index = len(self)
        length = 0
        for length, element in enumerate(other, 1):
            super(ObservableList, self).append(element)
        if length:
            self._notify_add_at(index, length)
12484
def consumer(function):
    """"""
    @wraps(function)
    def wrapper(*args, **kwargs):
        generator = function(*args, **kwargs)
        next(generator)
        return generator
    return wrapper
1013845
def _start_consumer(self, consumer):
        
        thread = threading.Thread(target=consumer.start,
                                  args=(self._connection,))
        thread.daemon = True
        thread.start()
960440
public Listener<T> add(Consumer<T> listener) {
    Assert.notNull(listener, "listener");
    ListenerHolder holder = new ListenerHolder(listener, ThreadContext.currentContext());
    listeners.add(holder);
    return holder;
  }
206631
def get_consumers(self, consumer_cls, channel):
        
        _log.debug('setting up consumers %s', self)

        for provider in self._providers:
            callbacks = [partial(self.handle_message, provider)]

            consumer = consumer_cls(
                queues=[provider.queue],
                callbacks=callbacks,
                accept=self.accept
            )
            consumer.qos(prefetch_count=self.prefetch_count)

            self._consumers[provider] = consumer

        return self._consumers.values()
175886
@Nonnull
	public static <T1, T2> LBiConsumerBuilder<T1, T2> biConsumer(Consumer<LBiConsumer<T1, T2>> consumer) {
		return new LBiConsumerBuilder(consumer);
	}
1295010
public void addServerReadyConsumer(Consumer<Server> consumer) {
        synchronized (readyConsumers) {
            if (ready) {
                consumer.accept(this);
            } else {
                readyConsumers.add(consumer);
            }
        }
    }
111248
def _add_subscribers_for_type(self, callback_type, subscribers, callbacks, **kwargs):
        '''  '''
        for subscriber in subscribers:
            callback_name = 'on_' + callback_type
            if hasattr(subscriber, callback_name):
                _function = functools.partial(getattr(subscriber, callback_name), **kwargs)
                callbacks.append(_function)
1101645
def create_consumer(self):
        """"""
        with self.connection_pool.acquire(block=True) as conn:
            yield self.consumer(conn)