Clear our pool for a server and mark it Unknown.

        Hold the lock when calling this. Does *not* request an immediate check.
196965
def _reset_server(self, address):
        
        server = self._servers.get(address)

        # "server" is None if another thread removed it from the topology.
        if server:
            server.reset()

            # Mark this server Unknown.
            self._description = self._description.reset_server(address)
            self._update_servers()
914883
def flush(self):
        
        self.notify(tuple(self._queue))
        self._queue.clear()
96131
async def clear_queue(self):
        """"""
        conn = await self._make_connection()
        try:
            script = """
                local keys = redis.call('KEYS', ARGV[1])
                redis.call('DEL', unpack(keys))
            """
            await conn.eval(
                script,
                keys=[],
                args=['*{}*'.format(settings.FLOW_MANAGER['REDIS_PREFIX'])],
            )
        finally:
            conn.close()
1016185
def release_pool(self):
        """"""
        if self._current_acquired > 0:
            raise PoolException("Can't release pool: %d connection(s) still acquired" % self._current_acquired)
        while not self._pool.empty():
            conn = self.acquire()
            conn.close()
        if self._cleanup_thread is not None:
            self._thread_event.set()
            self._cleanup_thread.join()
        self._pool = None
1337251
def _clear(self, wait):
        
        i = 0
        t1 = time.time()
        for k in self.bucket.get_keys():
            i += 1
            self.bucket.get(k).delete()
        print("\nDELETION TOOK: %s" % round(time.time() - t1, 2))
        if wait:
            while self._model_class.objects.count():
                time.sleep(0.3)
        return i
1141037
def _cleanup(self):
        """"""
        if self._cursor:
            LOGGER.debug('Closing the cursor on %s', self.pid)
            self._cursor.close()
            self._cursor = None

        if self._conn:
            LOGGER.debug('Freeing %s in the pool', self.pid)
            try:
                pool.PoolManager.instance().free(self.pid, self._conn)
            except pool.ConnectionNotFoundError:
                pass
            self._conn = None
274154
public synchronized void clear() {
		try {
			this.storage.close();
			this.storage = provider.createStorage();
		} catch (IOException e) {
			// major fuckup
			e.printStackTrace();
		}
		this.size = 0;
	}
1202012
def clear(self):
        
        self._lock = None
        self._ipopo_instance = None
        self._context = None
        self.requirement = None
        self._value = None
        self._field = None
512380
def _clear(self):
        
        self.__names.clear()
        self.__queue.clear()
        self.__context = None
1366187
public static void remove(Pool pool) {
    if (poolMap.containsKey(pool.getUrlParser())) {
      synchronized (poolMap) {
        if (poolMap.containsKey(pool.getUrlParser())) {
          poolMap.remove(pool.getUrlParser());
          shutdownExecutor();
        }
      }
    }
  }
85660
def close(self):
        
        self.poolmanager.clear()
        for proxy in self.proxy_manager.values():
            proxy.clear()
205569
def clear(self):
        """"""
        self._wlock.acquire()
        try:
            self._mapping.clear()
            self._queue.clear()
        finally:
            self._wlock.release()
1084812
def _clear(reason, idle_pool, using_pool, channel_pool, conn_id):
        
        with _lock():
            try:
                idle_pool.pop(conn_id)
                logger.info('a connection lost when not using')
            except KeyError:
                if using_pool.pop(conn_id, None):
                    logger.warn('connection lost when using, should be handled later')
                    return reason
            finally:
                channel_pool.pop(conn_id, None)
747327
public static synchronized void clearConnectionListener(String poolName, Object mcp, Object cl)
   {
      log.tracef("%s", new TraceEvent(poolName,
                                      Integer.toHexString(System.identityHashCode(mcp)),
                                      TraceEvent.CLEAR_CONNECTION_LISTENER,
                                      Integer.toHexString(System.identityHashCode(cl))));
   }
379188
public synchronized void clear()
    {
        pool.forEachUntil(new DoUntilProcedure<E>()
        {
            public boolean execute(E object)
            {
                destroyObject(object);
                return false;
            }
        });
        pool.clear();
        numActive = 0;
        notifyAll(); // num sleeping has changed
    }
1140393
def _RemoveFromPool(self):
    
    with self.pool.lock:

      # Pool is shutting down, we can't interfere.
      if not self.pool.started:
        return False

      # Keep a minimum number of threads in the pool.
      if len(self.pool) <= self.pool.min_threads:
        return False

      # Remove us from our pool.
      self.pool._RemoveWorker(self.name)  # pylint: disable=protected-access

      return True
517233
function action_queue_clear() {
    root$.emit('ready')
    execute_ready(root$.private$.ready_list.shift())

    if (root$.private$.ge.isclear()) {
      while (0 < root$.private$.ready_list.length) {
        execute_ready(root$.private$.ready_list.shift())
      }
    }
  }