ThreadRenamingRunnable must not be static

aperepel aperepel at gmail.com
Sun May 8 17:54:15 EDT 2011


Hi, in order not to resurrect dead threads like
http://www.jboss.org/netty/community.html#nabble-td2650084 I'm posting this
new one.

I understand the decision behind providing a meaningful default for
netty-created threads, and that it's not quite possible to know if the user
has already named the thread or it was generated, but... The problem is the
ThreadNameDeterminer is static and not thread safe. When I run multiple
netty instances in the JVM, this approach fails.

The biggest (unpleasant) surprise was that after providing my
ThreadNameFactories to the executor used by Netty, my thread names are
overwritten. So, how about dropping this static reference and instead
binding it per Server/ClientBootstrap? Makes sense?

Andrew

--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/ThreadRenamingRunnable-must-not-be-static-tp6342705p6342705.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list