By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,798 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,798 IT Pros & Developers. It's quick & easy.

Thread name from thread id?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

"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

P: n/a
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.