nelFactory.releaseExternalResources() shuts down the executor and // interrupts the I/O threads to terminate all I/O tasks and to release all // resources acquired by ChannelFactory. factory.releaseExternalResources(); // Note that globalExecutor is not shut down because VirtualExecutorService // implements its own termination management. All threads which were acquired // by ChannelFactory via VirtualExecutorService are returned to the pool. assert !globalExecutor.isShutdown();
The differences from an ordinary {@link ExecutorService}
A shutdown request ( {@link #shutdown()} or {@link #shutdownNow()}) does not shut down its parent {@link Executor} but simply sets its internal flag toreject further execution request.
{@link #shutdownNow()} interrupts only the thread which is executing thetask executed via {@link VirtualExecutorService}.
{@link #awaitTermination(long,TimeUnit)} does not wait for real threadtermination but wait until {@link VirtualExecutorService} is shut down andits active tasks are finished and the threads are returned to the parent {@link Executor}.
@author The Netty Project (netty-dev@lists.jboss.org)
@author Trustin Lee (tlee@redhat.com)
@version $Rev: 1587 $, $Date: 2009-07-20 13:50:03 +0900 (Mon, 20 Jul 2009) $
@apiviz.landmark