[Issue 7074] New: std.concurrency.receive segfaults when called from new thread
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 6 12:25:20 PST 2011
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 at puremagic.com
ReportedBy: code at klickverbot.at
--- Comment #0 from klickverbot <code at 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: -------
More information about the Digitalmars-d-bugs
mailing list