Put the cooked data in the input queue (with locking)
323088
def inputcooker_store_queue(self, char):
        """"""
        self.IQUEUELOCK.acquire()
        if type(char) in [type(()), type([]), type("")]:
            for v in char:
                self.cookedq.append(v)
        else:
            self.cookedq.append(char)
        self.IQUEUELOCK.release()
554169
def _process_data(self, obj):
        """"""
        assert len(self._waiters) > 0, (type(obj), obj)
        waiter, encoding, cb = self._waiters.popleft()
        if isinstance(obj, RedisError):
            if isinstance(obj, ReplyError):
                if obj.args[0].startswith('READONLY'):
                    obj = ReadOnlyError(obj.args[0])
            _set_exception(waiter, obj)
            if self._in_transaction is not None:
                self._transaction_error = obj
        else:
            if encoding is not None:
                try:
                    obj = decode(obj, encoding)
                except Exception as exc:
                    _set_exception(waiter, exc)
                    return
            if cb is not None:
                try:
                    obj = cb(obj)
                except Exception as exc:
                    _set_exception(waiter, exc)
                    return
            _set_result(waiter, obj)
            if self._in_transaction is not None:
                self._in_transaction.append((encoding, cb))
1132405
def writecooked(self, text):
        """"""
        # Ensure this is the only thread writing
        self.OQUEUELOCK.acquire()
        TelnetHandlerBase.writecooked(self, text)
        self.OQUEUELOCK.release()
225978
def input_loop():
    ''''''
    while mestate.exit != True:
        try:
            if mestate.exit != True:
                line = input(mestate.rl.prompt)
        except EOFError:
            mestate.exit = True
            sys.exit(1)
        mestate.input_queue.put(line)
1207897
def run(self):
        """"""
        input = self._consume()
        put_item = self._que_out.put
        
        try:
            if input is None: # producer
                res = self._callable(*self._args, **self._kwargs)
            else:
                res = self._callable(input, *self._args, **self._kwargs)
            if res != None:
                for item in res:
                    put_item(item)

        except Exception as e:
            # we catch an error, we send on the error que, we consume the input and we exit
            # consuming the input queue avoid to keep running processes before exiting with
            # errors
            self._que_err.put((self.name, e))
            if input is not None:
                for i in input:
                    pass
            raise

        finally:
            for i in range(self._num_followers):
                put_item(EXIT)
            self._que_err.put(EXIT)
830130
def send(self, data):
        
        self.stdin.write(data)
        self.stdin.flush()
571394
function onData( data ) {
		for ( var i = 0; i < data.length; i++ ) {
			this.queue( data[ i ] );
		}
	}
345346
public Put updatePut(Put put) {
    put.add(QueueEntryRow.COLUMN_FAMILY, consumerStateColumn, startRow);
    return put;
  }
119772
def feed(self, data):
        
        self._lock.acquire()
        try:
            if self._event is not None:
                self._event.set()
            self._buffer_frombytes(b(data))
            self._cv.notifyAll()
        finally:
            self._lock.release()
920064
def Run(self):
    """"""
    count = 0
    for count, input_data in enumerate(self.GetInput()):
      if count % 2000 == 0:
        logging.debug("%d processed.", count)
      args = (input_data, self.out_queue, self.token)
      self.thread_pool.AddTask(
          target=self.IterFunction, args=args, name=self.THREAD_POOL_NAME)

    while count >= 0:
      try:
        # We only use the timeout to wait if we got to the end of the Queue but
        # didn't process everything yet.
        out = self.out_queue.get(timeout=self.QUEUE_TIMEOUT, block=True)
        if out:
          yield out
          count -= 1
      except queue.Empty:
        break

    # Join and stop to clean up the threadpool.
    self.thread_pool.Stop(join_timeout=THREADPOOL_JOIN_TIMEOUT)
1082520
void put(final AbstractBatchEntry batchEntry) {
    try {
        this.queue.put(batchEntry);
    } catch (InterruptedException e) {
        throw new RuntimeException(e);
    }
    if (this.queue.size() >= this.actions) {
      this.scheduler.submit(new Runnable() {
        @Override
        public void run() {
          write();
        }
      });
    }
  }
662614
def queue_input(data) #:doc:
      sync do
        if options[:unbuffered_input]
          data = data.chars
          input_fifo.push *data
        else
          input_fifo.push data
        end
      end
    end
133800
def recvProxyData(self, data):
        """"""
        if self.initialized:
            self.sendData(data)
        else:
            self.queued_data.append(data)
211148
def _process_incoming_data(self):
        
        while self._running.is_set():
            if self.poller.is_ready:
                self.data_in += self._receive()
                self.data_in = self._on_read_impl(self.data_in)
886996
function processQueue(queue, value) {
            if (!queue || queue.length === 0) return;
            var handler, i = 0;

            while (handler = queue[i++]) {
                handler(value);
            }
        }
876663
def set_data(self, data):
        """"""
        for key, val in data.items():
            setattr(self, key, val)
        self.uptime['reloaded'] = datetime.now()
989021
void upsertEvent(EventId eventId, Lockable<V> event) {
		this.eventsBufferCache.put(eventId, event);
	}