Home All Groups Group Topic Archive Search About

How to find the Parent Thread

Author
2 May 2007 11:59 PM
Mark Howell
Is there a way to find the Parent Thread that spawned a certain Thread?
For example:
    Thread a
        Spawns Thread b
                From inside Thread b's process, can I get to Thread a's TLS
(Thread Local Storage)?

Author
3 May 2007 1:30 AM
Alvin Bruney [MVP]
I don't think so. you'd need to maintain a reference to the parent thread
since these really are separate execution streams.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley


Show quote
"Mark Howell" <Mark.How***@Microsoft.com> wrote in message
news:OQGPpXRjHHA.1216@TK2MSFTNGP03.phx.gbl...
> Is there a way to find the Parent Thread that spawned a certain Thread?
> For example:
>    Thread a
>        Spawns Thread b
>                From inside Thread b's process, can I get to Thread a's TLS
> (Thread Local Storage)?
>

AddThis Social Bookmark Button