[Issue 8774] 2.059 worked 2.060 does not: Unable to join thread

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 19 00:34:01 PDT 2012


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



--- Comment #8 from luka8088 <luka8088 at owave.net> 2012-10-19 00:33:58 PDT ---
Here is a simple test case:

-----

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 at 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

-- 
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