468,247 Members | 1,323 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Thread name from thread id?

Anyone have any hints on how to obtain a thread's name from the thread id?
I'm using a handler in the Logger class, which provides a method to get the
id of the thread that invoked the logger, but no method for the name.

Thanks much,

Hector
Jul 17 '05 #1
2 5758

"Hector Urroz" <h.*****@comcast.net> wrote in message
news:H4********************@comcast.com...

Anyone have any hints on how to obtain a thread's name from
the thread id? I'm using a handler in the Logger class, which
provides a method to get the id of the thread that invoked the
logger, but no method for the name.


This is possible, though whether it is practical in your case is for you to
decide. You may want to read:

http://java.sun.com/products/jpda/

for details.

I hope this helps.

Anthony Borla
Jul 17 '05 #2
Anthony, thanks for the suggestion, but I'm looking for something a little
more lightweight, callable within my application's jvm. Someone else
responded with an emailed algorithm that might do the job.

Hector
"Anthony Borla" <aj*****@bigpond.com> wrote in message
news:u1******************@news-server.bigpond.net.au...

"Hector Urroz" <h.*****@comcast.net> wrote in message
news:H4********************@comcast.com...

Anyone have any hints on how to obtain a thread's name from
the thread id? I'm using a handler in the Logger class, which
provides a method to get the id of the thread that invoked the
logger, but no method for the name.

This is possible, though whether it is practical in your case is for you

to decide. You may want to read:

http://java.sun.com/products/jpda/

for details.

I hope this helps.

Anthony Borla

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

31 posts views Thread by AlexeiOst | last post: by
4 posts views Thread by Leonardo Hyppolito | last post: by
7 posts views Thread by Ivan | last post: by
13 posts views Thread by Bob Day | last post: by
7 posts views Thread by Charles Law | last post: by
5 posts views Thread by Mark R. Dawson | last post: by
5 posts views Thread by taylorjonl | last post: by
8 posts views Thread by =?Utf-8?B?cmFuZHkxMjAw?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.