Can't send messages to tid spawned in a Windows DLL. Bug?

Atila Neves via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Feb 16 04:07:40 PST 2017


This fails for me in a DLL:

auto tid = spawn(&func);
assert(tid != Tid.init);

If I print out the tid, I find that its message box is null. This 
is odd, since according the code in std.concurrency there's 
nothing weird about how it gets a message box, it's just `auto 
spawnTid = Tid(new MessageBox);`. So... `new` is returning null???

The really weird thing is that a thread is spawned and func 
starts executing. I just can't send it any messages without 
crashing.

Atila


More information about the Digitalmars-d-learn mailing list