Clear the queue of database operations without executing any of
			 the pending operations
347495
def clear_queue(self, trans_id=None):
		''' '''
		if not self.queue:
			return
		if trans_id is None:
			self.queue = []
			return

		for index, op in enumerate(self.queue):
			if op.trans_id == trans_id:
				break
		self.queue = self.queue[:index]
336388
def flush(self):
        """"""
        keys = list(self.keys())
        if keys:
            return self.database.delete(*keys)
1125060
def clear(self):
    

    with synchronized(self.__queue):
      jobs = self.__queue.snapshot()
      self.__queue.clear()
    return jobs
205569
def clear(self):
        """"""
        self._wlock.acquire()
        try:
            self._mapping.clear()
            self._queue.clear()
        finally:
            self._wlock.release()
623390
def clear(self):
        """"""
        while not self._pool.empty():
            conn = yield from self._pool.get()
            self._do_close(conn)
39874
def purge(self):
        '''
        
        '''
        for table_name in self._db.list_tables():
            self._db.flush(table_name)

        self._run_init_queries()
604044
def cleanup(self):
        """"""
        self.num_puts = 0
        cached = []
        for i, url_data in enumerate(self.queue):
            key = url_data.cache_url
            cache = url_data.aggregate.result_cache
            if cache.has_result(key):
                cached.append(i)
        for pos in cached:
            self._move_to_top(pos)
296589
public function clear()
    {
        $this->data = [];
        $this->expire = [];
        $this->ttl = [];

        $this->timer->stop();
        $this->queue = new \SplPriorityQueue();
    }
164515
def clear(self):
        
        with self.__lock:
            # Empty the current queue
            try:
                while True:
                    self._queue.get_nowait()
                    self._queue.task_done()
            except queue.Empty:
                # Queue is now empty
                pass

            # Wait for the tasks currently executed
            self.join()
227906
def flush(self, queue_name):
        
        for name in (queue_name, dq_name(queue_name)):
            self.do_purge(name)
1084725
public void cancelQueuedTasks() {
      ArrayList<QueueingTask> queuedTasks = new ArrayList<QueueingTask>();
      queue.drainTo(queuedTasks);
      for (QueueingTask task : queuedTasks) {
         task.cancel(false);
      }
   }
768410
def cleardb(force=False):
    """"""

    # Drop database, if it exists
    if db_exists():
        try:
            dropdb(force)
        except subprocess.CalledProcessError as error:
            output = error.output.decode("utf-8")
            if "is being accessed by other users" in output:
                raise ValueError(
                    "{}\n"
                    "To forcibly terminate other sessions, run "
                    "this command again with --force".format(output)
                )
            else:
                raise
    else:
        logger.info(
            "Database %s does not currently exist; no need to drop", repr(DB["NAME"])
        )
    createdb()
603229
def do_clearqueue(self, line):
        """"""
        self._split_args(line, 0, 0)
        self._command_processor.get_operation_queue().clear()
        self._print_info_if_verbose("All operations in the write queue were cleared")
889841
def clear(self):
        

        for walker in self._virtual_walkers:
            walker.skip_all()

        self._engine.clear()

        for walker in self._queue_walkers:
            walker.skip_all()

        self._last_values = {}
60053
def queuedb_remove(path, entry, cur=None):
    
    sql = "DELETE FROM queue WHERE queue_id = ? AND name = ?;"
    args = (entry['queue_id'], entry['name'])

    cursor = None
    if cur:
        cursor = cur
    else:
        db = queuedb_open(path)
        if db is None:
            raise Exception("Failed to open %s" % path)

        cursor = db.cursor()

    res = queuedb_query_execute(cursor, sql, args)

    if cur is None:
        db.commit()
        db.close()

    return True
1136863
public void clear() {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Object[] array = queue;
            int n = size;
            size = 0;
            for (int i = 0; i < n; i++)
                array[i] = null;
        } finally {
            lock.unlock();
        }
    }
979155
def clear_transaction(self):
        
        with self._transaction_lock:
            local = self._transaction_local
            if not local.pipes:
                raise ValueError('No transaction is currently active.')
            local.abort()