From ab4d7f766066421eef7b3c6362bc59fe1fff6a74 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 5 Sep 2008 00:59:07 +0000 Subject: [PATCH] Fixed an instruction about graceful shutdown - should use shutdownNow instead of shutdown for faster shutdown (and it's safe yet) --- .../netty/channel/socket/nio/NioClientSocketChannelFactory.java | 2 +- .../netty/channel/socket/nio/NioServerSocketChannelFactory.java | 2 +- .../netty/channel/socket/oio/OioClientSocketChannelFactory.java | 2 +- .../netty/channel/socket/oio/OioServerSocketChannelFactory.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java index 29e7c9f304..86d5c193f1 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.java @@ -76,7 +76,7 @@ import org.jboss.netty.channel.socket.SocketChannel; * *
    *
  1. close all channels created by the factory,
  2. - *
  3. call {@link ExecutorService#shutdown()} for all executors which were + *
  4. call {@link ExecutorService#shutdownNow()} for all executors which were * specified to create the factory, and
  5. *
  6. call {@link ExecutorService#awaitTermination(long, TimeUnit)} * until it returns {@code true}.
  7. diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java index f540683bf3..9ae5d4fed6 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioServerSocketChannelFactory.java @@ -79,7 +79,7 @@ import org.jboss.netty.channel.socket.ServerSocketChannelFactory; *
      *
    1. unbind all channels created by the factory, *
    2. close all child channels accepted by the unbound channels,
    3. - *
    4. call {@link ExecutorService#shutdown()} for all executors which were + *
    5. call {@link ExecutorService#shutdownNow()} for all executors which were * specified to create the factory, and
    6. *
    7. call {@link ExecutorService#awaitTermination(long, TimeUnit)} * until it returns {@code true}.
    8. diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java index 0dd20d2811..a1eb899bb0 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/OioClientSocketChannelFactory.java @@ -62,7 +62,7 @@ import org.jboss.netty.channel.socket.SocketChannel; * *
        *
      1. close all channels created by the factory,
      2. - *
      3. call {@link ExecutorService#shutdown()} for the {@code workerExecutor} + *
      4. call {@link ExecutorService#shutdownNow()} for the {@code workerExecutor} * which was specified to create the factory, and
      5. *
      6. call {@link ExecutorService#awaitTermination(long, TimeUnit)} * until it returns {@code true}.
      7. diff --git a/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java b/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java index 09092eccd9..125257dca4 100644 --- a/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java +++ b/src/main/java/org/jboss/netty/channel/socket/oio/OioServerSocketChannelFactory.java @@ -74,7 +74,7 @@ import org.jboss.netty.channel.socket.ServerSocketChannelFactory; *
          *
        1. unbind all channels created by the factory, *
        2. close all child channels accepted by the unbound channels,
        3. - *
        4. call {@link ExecutorService#shutdown()} for all executors which were + *
        5. call {@link ExecutorService#shutdownNow()} for all executors which were * specified to create the factory, and
        6. *
        7. call {@link ExecutorService#awaitTermination(long, TimeUnit)} * until it returns {@code true}.