[Issue 649] concatenation hangs in threaded program

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Oct 1 01:58:47 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=649

badlink <andrea.9940 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrea.9940 at gmail.com
         Resolution|---                         |FIXED

--- Comment #6 from badlink <andrea.9940 at gmail.com> ---
The program exits normally on Arch Linux (DMD 2.067.0-b1)

I have updated the test case:

import core.thread;
import std.string;
extern(C) uint sleep(uint secs);
class Test {
  Thread thr;
  void printStats() { 
    sleep(1);
    char[] r;
    r ~= "a";
  }
  this() {
    thr = new Thread(&printStats);
    thr.start();
  }
  ~this() {
     thr.join();
  }
}

void main() {
  Test t = new Test();
  destroy(t);
}

--


More information about the Digitalmars-d-bugs mailing list