Thread hirarchy

Is it possible to get the parrent thread of a thread.I mean I need the Thread that created/started the currentThread. What is the best way to achive this?
[168 byte] By [charlie.babitta] at [2007-10-3 5:07:19]
# 1

> Is it possible to get the parrent thread of a

> thread.

> I mean I need the Thread that created/started the

> currentThread. What is the best way to achive this?

Java doesn't have a notion of "parent" thread - all threads are siblings.

If you need to know the creating thread then you will need to keep track of this yourself. If you are using a custom thread class then simply add it to the state of that class and set it during construction. Otherwise you'll need to maintain a seperate table.

davidholmesa at 2007-7-14 23:13:20 > top of Java-index,Core,Core APIs...