http://d.puremagic.com/issues/show_bug.cgi?id=7074

           Summary: std.concurrency.receive segfaults when called from new
                    thread
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: c...@klickverbot.at


--- Comment #0 from klickverbot <c...@klickverbot.at> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to