flush the queue if it console is available - this function is run on an interval
500003
function flushQueueIfAvailable()
    {
        if (!isLogAvailable())
            return;

        clearInterval(WebInspector.log.interval);
        delete WebInspector.log.interval;

        flushQueue();
    }
834807
def flush(self):
        
        for elem in self:
            if elem.id[0] != scoop.worker:
                elem._delete()
            self.socket.sendFuture(elem)
        self.ready.clear()
        self.movable.clear()
116339
def run(self):
        
        while True:
            self._event.clear()
            self._queue.get().run(self._event)
201762
function flush () {
  let start
  functionalIds.clear()
  captureIds.clear()
  if (process.env.NODE_ENV !== 'production') {
    captureCount = 0
    start = isBrowser ? window.performance.now() : 0
  }
  const payload = stringify({
    inspectedInstance: getInstanceDetails(currentInspectedId),
    instances: findQualifiedChildrenFromList(rootInstances)
  })
  if (process.env.NODE_ENV !== 'production') {
    console.log(`[flush] serialized ${captureCount} instances${isBrowser ? `, took ${window.performance.now() - start}ms.` : ''}.`)
  }
  bridge.send('flush', payload)
}
873691
private void flushInternal() throws IOException {
    isClosed();
    dfsClient.checkOpen();

    long toWaitFor;
    synchronized (this) {
      enqueueCurrentPacket();
      toWaitFor = lastQueuedSeqno;
    }

    waitForAckedSeqno(toWaitFor);
  }
605797
public synchronized void flush()
	{
		if (out != null)
			try {
				out.flush();
			}
			catch (final IOException e) {
				getErrorHandler().error(this, "on flush", e);
			}
	}
1067236
def flush(self, error=False, prompt=False):
        """"""
        PythonShellWidget.flush(self, error=error, prompt=prompt)
        if self.interrupted:
            self.interrupted = False
            raise KeyboardInterrupt
608716
function online() {
    repl._flushing = true;

    if (timer) {
      clearTimeout(timer);
    }

    timer = setTimeout(flushHistory, kDebounceHistoryMS);
  }
227906
def flush(self, queue_name):
        
        for name in (queue_name, dq_name(queue_name)):
            self.do_purge(name)
815461
def flush(base = nil)
    debug { 'flush ' << base.to_s }

    @sync.synchronize do

      if @flush_delay
        next_flush = @last_flush + @flush_delay

        if next_flush > Time.now
          flush_at(next_flush, base)
        else
          flush_now(base)
          @last_flush = Time.now
        end

      else
        flush_now(base)
      end
    end
  end
125027
function flushEvents() {
  var tmp = PENDING_QUEUE;
  PENDING_QUEUE = [];
  for (var i = 0; i < tmp.length; i++) {
    clientObj.send('log', tmp[i].item, tmp[i].fn);
  }
}
314457
function restartProcessing (q) {
  logger('restartProcessing')
  setTimeout(function randomRestart () {
    queueProcess.restart(q)
  }, Math.floor(Math.random() * 1000))
}
1324827
function checkQueue() {
    if(!inInterval()) {
      if(requestQueue.length) {
        var next = requestQueue.shift();
        sendRequest(next);
      } else if(timer) {
        clearInterval(timer); // No need to leave the timer running if we don't have any requests.
      }
    }
  }
954370
void flushLogQueue() {
        Set<String> problems = new LinkedHashSet<String>();
        synchronized (messageQueue) {
            Iterator<LogEntry> i = messageQueue.iterator();
            while (i.hasNext()) {
                problems.add("\t\t" + i.next().getMessage() + "\n");
                i.remove();
            }
        }
        if (!problems.isEmpty()) {
            logger.transformationWarnings(target.getHostName(), problems);
        }
    }
118787
def __flush_eventqueue(self):
        """"""
        while self.eventqueue:
            past_event = self.eventqueue.pop(0)
            self.postprocess_keyevent(past_event)
371900
void enqueue(Runnable runnable, boolean flush) {
    queue.add(new RunnableCommand(runnable));
    if (flush) {
      scheduleFlush();
    }
  }
1366694
function run() {
  const current = now();
  const queue = timeoutQueue.slice();
  let interval = INTERVAL_MAX;

  timeoutQueue.length = 0;

  // Reset
  if (runRafId > 0 || runTimeoutId > 0) {
    stop();
  }

  for (let i = queue.length - 1; i >= 0; i--) {
    const item = queue[i];

    if (!item.cancelled) {
      const duration = item.time - current;

      if (duration <= 0) {
        if (isDev) {
          debug('timeout triggered for "%s" at %s', item.id, new Date().toLocaleTimeString());
        }
        item.fn.apply(item.fn, item.args);
      } else {
        // Store smallest duration
        if (duration < interval) {
          interval = duration;
        }
        timeoutQueue.push(item);
      }
    }
  }

  // Loop
  if (timeoutQueue.length > 0) {
    // Use raf if requested interval is less than cutoff
    if (interval < INTERVAL_CUTOFF) {
      runRafId = raf(run);
    } else {
      runTimeoutId = setTimeout(run, interval);
    }
  }
}