On Wed, 29 Jun 2011 22:59:47 +0200, Andrej Mitrovic
<andrej.mitrov...@gmail.com> wrote:
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
}
std.concurrency actually has a thread-local variable called 'owner',
which is exactly what you want. However, it is private.
This may very well be worth an enhancement request.
--
Simen