Collects the result from the workers and closes the thread pool.
324168
def close(self):
        
        self.pool.close()
        self.pool.terminate()
        self.pool.join()
108535
@Override
    public void close()
    {
        Preconditions.checkState(Thread.currentThread().equals(ourThread), "Not in the correct thread");
        failedSessionThreads.remove(ourThread);

        client.removeParentWatcher(watcher);
    }
849486
public void close() throws MapReduceException {
        try {
            if(writer != null) {
                writer.flush();
                writer.close();
            }
        } catch (IOException e) {
            throw new MapReduceException("Failed to close the output collector", e);
        }
    }
549103
def close_thread_handles(self):
        
        for aThread in self.iter_threads():
            try:
                aThread.close_handle()
            except Exception:
                try:
                    e = sys.exc_info()[1]
                    msg = "Cannot close thread handle %s, reason: %s"
                    msg %= (aThread.hThread.value, str(e))
                    warnings.warn(msg)
                except Exception:
                    pass
680857
public void shutdown() {
        logger.info("Closing Retrieval Manager");
        workerPool.shutdown();

        try {
            workerPool.awaitTermination(30, TimeUnit.MINUTES);
        } catch (InterruptedException e) {
            // Exit wait on interruption
        }

        complete = true;
    }
21750
def close(self):
        
        with self._lock:
            if self._closing:
                return
            self._closing = True
            if not self._workers:
                self._closed.set()
                return
            self._queue.put_nowait(self._PoolClosing)
        self._closed.wait()
355503
def close(self):
        '''
        
        '''
        if self._closed:
            return
        self._closed = True
        self._worker_thread.work_queue.put(self.aiohttp_session.close())
        self._worker_thread.work_queue.put(self.worker_thread.sentinel)
        self._worker_thread.join()
88665
@Override
  public void close() {

    LOG.log(Level.FINE, "EvaluatorIdlenessThreadPool shutdown: begin");

    this.executor.shutdown();

    boolean isTerminated = false;
    try {
      isTerminated = this.executor.awaitTermination(this.waitInMillis, TimeUnit.MILLISECONDS);
    } catch (final InterruptedException ex) {
      LOG.log(Level.WARNING, "EvaluatorIdlenessThreadPool shutdown: Interrupted", ex);
    }

    if (isTerminated) {
      LOG.log(Level.FINE, "EvaluatorIdlenessThreadPool shutdown: Terminated successfully");
    } else {
      final List<Runnable> pendingJobs = this.executor.shutdownNow();
      LOG.log(Level.SEVERE, "EvaluatorIdlenessThreadPool shutdown: {0} jobs after timeout", pendingJobs.size());
      LOG.log(Level.FINE, "EvaluatorIdlenessThreadPool shutdown: pending jobs: {0}", pendingJobs);
    }
  }
1293911
@Override
    public void finish() {
        // An assertion failure here means this CE
        // did not come from a CE pool and this
        // should never be the case;
        //assert cacheEntryPool != null;
        // if cacheEntryPool is null, the cacheEntry is not allocated from the pool
        if (cacheEntryPool != null) {
            synchronized (cacheEntryPool.cache) {
                decRefCount();
                if (refCount.get() <= 0) {
                    if (refCount.get() < 0)
                        refCount.set(0);
                    if (removeWhenUnpinned && refCount.get() == 0) {
                        returnToPool();
                    }
                }
            }
        } else {
            synchronized (this.id) {
                decRefCount();
                if (refCount.get() <= 0) {
                    reset();
                }
            }
        }
    }
871936
public void close() {
		stopFetching = true;
		if(rowFetcher != null)
			rowFetcher.interrupt();
		try {
			results.close();
		} catch (OWLException e) {
			// TODO: Handle this in a reasonable manner
			System.out.println(e);
		}
	}
796659
def close(self):
        
        if not self._closed:
            self._closed = True
            self._stop_multi_pools()
            if self._http_pool is not None:
                self._http_pool.clear()
                self._http_pool = None
            if self._tcp_pool is not None:
                self._tcp_pool.clear()
                self._tcp_pool = None
1307212
@FFDCIgnore(value = { InterruptedException.class })
    public void close() {
        // remove all the clients from the deque, closing them as we go
        while (numClientsClosed.get() < numClients) {
            try {
                Client client = clients.takeFirst();
                try {
                    client.close();
                } catch (Exception e) {
                    //Ignore this
                }
                numClientsClosed.incrementAndGet();

                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    Tr.event(tc, "pool closed   - " + numClientsClosed + " of " + numClients + " clients closed");
            } catch (InterruptedException e) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    Tr.event(tc, "InterruptedException during close - will retry");
            }
        }
    }
146905
@Override
    public void close() {
        // unregister MBeans
        if(stats != null) {
            try {
                if(this.jmxEnabled)
                    JmxUtils.unregisterMbean(getAggregateMetricName());
            } catch(Exception e) {}
            stats.close();
        }
        factory.close();
        queuedPool.close();
    }
317821
def close(self):
        
        if not self._closed:
            self.add_event(self._sentinel_event)
            self.flush()
            self._worker.join()
            self._ev_writer.close()
            self._closed = True
317289
def close(self):
        '''
        
        '''
        if self._wrapped_connection and self._pool:
            logger.debug("Returning connection %s to pool %s" % (self._wrapped_connection, self._pool))
            self._pool.putconn(self._wrapped_connection)
            self._wrapped_connection = None
1024393
@Beta(SinceVersion.V1_1_0)
    public void close() {
        httpClient.dispatcher().executorService().shutdown();
        httpClient.connectionPool().evictAll();
        synchronized (httpClient.connectionPool()) {
            httpClient.connectionPool().notifyAll();
        }
        synchronized (AsyncTimeout.class) {
            AsyncTimeout.class.notifyAll();
        }
    }
778330
def close(self):
        """"""
        logger.info('Closing producer')
        self.flush_queue()
        self.monitor_running.clear()
        self.pool.shutdown()
        logger.info('Producer closed')