Fixed an instruction about graceful shutdown - should use shutdownNow instead of shutdown for faster shutdown (and it's safe yet)

This commit is contained in:
Trustin Lee 2008-09-05 00:59:07 +00:00
parent e1709c8e4b
commit ab4d7f7660
4 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ import org.jboss.netty.channel.socket.SocketChannel;
*
* <ol>
* <li>close all channels created by the factory,</li>
* <li>call {@link ExecutorService#shutdown()} for all executors which were
* <li>call {@link ExecutorService#shutdownNow()} for all executors which were
* specified to create the factory, and</li>
* <li>call {@link ExecutorService#awaitTermination(long, TimeUnit)}
* until it returns {@code true}.</li>

View File

@ -79,7 +79,7 @@ import org.jboss.netty.channel.socket.ServerSocketChannelFactory;
* <ol>
* <li>unbind all channels created by the factory,
* <li>close all child channels accepted by the unbound channels,</li>
* <li>call {@link ExecutorService#shutdown()} for all executors which were
* <li>call {@link ExecutorService#shutdownNow()} for all executors which were
* specified to create the factory, and</li>
* <li>call {@link ExecutorService#awaitTermination(long, TimeUnit)}
* until it returns {@code true}.</li>

View File

@ -62,7 +62,7 @@ import org.jboss.netty.channel.socket.SocketChannel;
*
* <ol>
* <li>close all channels created by the factory,</li>
* <li>call {@link ExecutorService#shutdown()} for the {@code workerExecutor}
* <li>call {@link ExecutorService#shutdownNow()} for the {@code workerExecutor}
* which was specified to create the factory, and</li>
* <li>call {@link ExecutorService#awaitTermination(long, TimeUnit)}
* until it returns {@code true}.</li>

View File

@ -74,7 +74,7 @@ import org.jboss.netty.channel.socket.ServerSocketChannelFactory;
* <ol>
* <li>unbind all channels created by the factory,
* <li>close all child channels accepted by the unbound channels,</li>
* <li>call {@link ExecutorService#shutdown()} for all executors which were
* <li>call {@link ExecutorService#shutdownNow()} for all executors which were
* specified to create the factory, and</li>
* <li>call {@link ExecutorService#awaitTermination(long, TimeUnit)}
* until it returns {@code true}.</li>