digitalmars.D.bugs - [Issue 7074] New: std.concurrency.receive segfaults when called from new thread
- d-bugmail puremagic.com (30/30) Dec 06 2011 http://d.puremagic.com/issues/show_bug.cgi?id=7074
- d-bugmail puremagic.com (10/10) Oct 08 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7074
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: nobody puremagic.com ReportedBy: code klickverbot.at --- Comment #0 from klickverbot <code 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: -------
Dec 06 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7074 ratchet freak <ratchet.freak gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ratchet.freak gmail.com --- Comment #1 from ratchet freak <ratchet.freak gmail.com> 2012-10-08 11:07:31 PDT --- fix: use thisTid in recieve instead of accessing mbox directly -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 08 2012