Summary: std.concurrency.receive segfaults when called from new
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from klickverbot <> 2011-12-06 12:25:18 PST 
Not sure if this is expected:
import core.thread;
import std.concurrency;
void main() {
  (new Thread({receive((bool b){});})).start();

crashes using Phobos c83edad (2.057 beta), because the mbox of the newly
created thread has not been initialized yet (it is for the main thread in a
shared static constructor, and by spawn() for threads created by it).

Workaround: Force initialization of mbox by calling std.concurrency.thisTid on
the new thread first.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to