[JBoss JIRA] Commented: (NETTY-223) Netty renames configured thread name for threads executing in a pool
Trustin Lee (JIRA)
jira-events at lists.jboss.org
Thu Sep 3 22:26:11 EDT 2009
[ https://jira.jboss.org/jira/browse/NETTY-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12484498#action_12484498 ]
Trustin Lee commented on NETTY-223:
-----------------------------------
For your convenience, I've just added ThreadNameDeterminer.CURRENT and PROPOSED. You could reject all attempts to rename threads like the following:
ThreadRenamingRunnable.setThreadNameDeterminer(ThreadNameDeterminer.CURRENT);
> 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