From: Eric Hodel Date: 2005-08-30T02:58:46+09:00 Subject: Re: Associating a name with a thread? On 29 Aug 2005, at 06:50, Andrew S. Townley wrote: > > Hi Robert & Logan, > > This tells me that I've created as many threads as I expect, however > there are still a large number of threads that are created elsewhere > that don't have names. I suppose this is the wrong approach because I > really want to know who created them and where. I guess I'll run the > whole thing with trace and see what I get. You really want to use ThreadGroups to organize your threads. A thread that spawns new threads will add them to whichever ThreadGroup it is in. You can monitor the ThreadGroup's size to figure out who is spawning the new threads. > I had hoped I wasn't missing anything obvious. Question though: if I > re-open the Thread class to add a name attribute, does that apply to > all, pre-existing threads or just new ones? There are 2 others that I > know about, but... All. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04