Get parent Tid of a thread?

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Jun 29 13:59:47 PDT 2011


Is there any way a newly spawned thread can get the Tid of the thread
that spawned it, basically its parent? I'd prefer that over using
this:

__gshared mainThread; // so workThread can access it

{
mainThread = thisTid();
auto workThread = spawn(&MidiThread);  // local
}


More information about the Digitalmars-d-learn mailing list