← Back to index
|
Original Bugzilla link
Bug 8852 – Unable to join thread (started by another thread)
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-19T00:28:00Z
Last change time
2012-10-19T00:32:12Z
Assigned to
nobody
Creator
luka8088
Comments
Comment #0
by luka8088 — 2012-10-19T00:28:36Z
module program; import std.stdio; import core.thread; void main () { Thread t1, t2; t1 = new Thread(delegate { t2.start(); }); t2 = new Thread(delegate { Thread.sleep(dur!"seconds"(1)); }); t1.start(); t2.join(); } -----
http://dpaste.dzfl.pl/0d24dd06
output: core.thread.ThreadException@src/core/thread.d(780): Unable to join thread if t2.join occurs after t2 already finished then exception is not thrown, hence the sleep
Comment #1
by alex — 2012-10-19T00:29:58Z
Possibly related to #8774.
Comment #2
by luka8088 — 2012-10-19T00:32:12Z
(In reply to comment #1) > Possibly related to #8774. Yes, thank you for the note *** This issue has been marked as a duplicate of issue 8774 ***