[JBoss JIRA] Created: (NETTY-223) Netty renames configured thread name for threads executing in a pool

Elias Ross (JIRA) jira-events at lists.jboss.org
Thu Sep 3 17:38:23 EDT 2009


Netty renames configured thread name for threads executing in a pool
--------------------------------------------------------------------

                 Key: NETTY-223
                 URL: https://jira.jboss.org/jira/browse/NETTY-223
             Project: Netty
          Issue Type: Feature Request
            Reporter: Elias Ross
            Assignee: Trustin Lee


It was a little bit of a surprise to discover that the names of the threads from the factory, for executors created by Executors.newCachedThreadPool(ThreadFactory tf), were renamed by Netty.

Usually threads are named upon creation by the thread pool and not renamed. In my experience, at least.

(If they were renamed to something, it'd be nice to associate it with a particular server instance, like the port. They're pretty generic at the moment.)

Maybe Netty simply needs to be shipped with a factory class similar to Executors, which creates a thread pool with naming you use internally.

        NioServerSocketChannelFactory factory = 
            new NioServerSocketChannelFactory(
                    NettyExecutors.bossThreadPool(),
                    NettyExecutors.workerThreadPool()
                    );

And why not simply have:

        NioServerSocketChannelFactory factory = 
            new NioServerSocketChannelFactory();

I have a lot of different sorts of handlers and would like to keep them straight. ThreadGroups are one option, but their names don't get logged in the system log with Log4j.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the netty-dev mailing list