On Sunday, 3 July 2016 at 23:20:35 UTC, Hiemlick Hiemlicker wrote:


The only difference is that the thread is a windows CreateThread. I guess D doesn't know about such threads and hence shared doesn't extend across to them?

The runtime doesn't know about external threads, no. You have to tell it about them with a call to thread_attachThis() [1]. Still, AFAIK, shared variables should not be dependent upon runtime threads. Do you have a minimum working example to share?

[1] https://dlang.org/phobos/core_thread.html#.thread_attachThis

Reply via email to