From: "Andrew S. Townley" Date: 2005-08-29T22:19:55+09:00 Subject: Associating a name with a thread? Hi. Me again. I'm doing some research/work using threads with ruby. I saw this in the ri docs for Thread#inspect: --------------------------------------------------------- Thread#inspect thr.inspect => string ------------------------------------------------------------------------ Dump the name, id, and status of _thr_ to a string. And was wondering how you assign a meaningful name to a thread. Right now, I have about 2X as many threads created as I would've thought (using Thread.list.length). Desk-checking the code doesn't show anything obvious, but I have instrumented it to the point that I have output with the Thread information, e.g. #: doing something But, what I want is to be able to do something like task1 = Thread.new("task1") { ... } or at least task1 = Thread.new { ... } task1.name = "task1" to get it to show up during execution. Maybe I'm going about this the wrong way. Any pointers in the right direction would be appreciated. Cheers, ast *************************************************************************************************** The information in this email is confidential and may be legally privileged. Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system. ***************************************************************************************************