[JBoss JIRA] Updated: (NETTY-366) enable Netty client / servers to be shutdown from handlers (factory.releaseExternalResources deadlock avoidance)

Trustin Lee (JIRA) jira-events at lists.jboss.org
Mon Jan 31 20:18:39 EST 2011


     [ https://issues.jboss.org/browse/NETTY-366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee updated NETTY-366:
------------------------------

    Fix Version/s: 4.0.0.Alpha1
                       (was: 3.2.4.Final)


Will fix in 4.0

> enable Netty client / servers to be shutdown from handlers (factory.releaseExternalResources deadlock avoidance)
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: NETTY-366
>                 URL: https://issues.jboss.org/browse/NETTY-366
>             Project: Netty
>          Issue Type: Feature Request
>          Components: Core API
>    Affects Versions: 3.2.3.Final
>         Environment: all
>            Reporter: Christian Migowski
>            Assignee: Trustin Lee
>            Priority: Minor
>             Fix For: 4.0.0.Alpha1
>
>
> IMO, Netty could be improved by changing the *ChannelFactory.releaseExternalResources() method from now
>     public void releaseExternalResources() {
>         ExecutorUtil.terminate(bossExecutor, workerExecutor);
>     }
> (or similar in other implementations, this is from NioServerSocketChannelFactory)
> to
>     public void releaseExternalResources() {
>         Thread t = new Thread() {
>             public void run() {
>                 ExecutorUtil.terminate(bossExecutor, workerExecutor);
>             }
>         };
>         t.setName("ChannelFactory shutdown thread");
>         t.start();
>         boolean interrupted = false;
>         try {
>             t.join();
>         } catch (InterruptedException e) {
>             interrupted = true;
>         }
>         if (interrupted)
>             Thread.currentThread().interrupt();
>     }
> As far as I can tell, this wouldn't change anything big in Netty but enabling to call releaseExternalResources() from handlers which is producing a endless loop right now.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the netty-dev mailing list