A better way to do thread renaming

"이희승 (Trustin Lee)" trustin at gmail.com
Tue Aug 24 22:34:31 EDT 2010



On 07/14/2010 04:46 PM, Galder Zamarreño wrote:
> 
> On Jul 2, 2010, at 9:59 AM, 이희승 (Trustin Lee) wrote:
> 
>> Service: New I/O, Old I/O, ...
>> Category: server boss, server worker, client boss, client worker, ...
>> Comment: local address, remote address, channel ID, ... (depending on
>> transport)
>>
>> It might be a better idea to limit the allowed characters for service,
>> category, and thread ID (no whitespace for example.)
> 
> That's definitely a good idea. Think about grep. Quite often I grep by thread name and if it contains spaces, you have to start putting double quotes. 

netty-trunk now allows only [a-zA-Z0-9]* for service/category names.

Thread ID has been split into parentId and id and each allows only
[a-zA-Z0-9]* likewise.  The resulting default thread name looks like this:

    "NewIO ServerBoss #1 ([id: 0x00785d65, /0:0:0:0:0:0:0:0:8080])"
    "NewIO ServerWorker #1:1"

There's no restriction on comments - I thought it will be too much since
it's for human primarily.

Please feel free to let me know if you have more nice ideas.

Cheers,
Trustin

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


More information about the netty-users mailing list