http://d.puremagic.com/issues/show_bug.cgi?id=4307
Summary: spawn()'ed thread doesn't terminate Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: to...@yahoo.com --- Comment #0 from to...@yahoo.com 2010-06-13 18:50:11 PDT --- Using DMD 2.047. This example hangs after printing '9'. From reading Andrei's book, my understanding is that the spawned thread should terminate automatically when its owner thread terminates. But that doesn't happen here. --- import std.concurrency; import std.stdio; void f() { for (;;) { int i = receiveOnly!int(); writeln(i); } } void main() { Tid tid = spawn(&f); foreach (int i; 0..10) { send(tid, i); } } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------