assert or execption case program hang in multi thread
liyu
yunwind at msn.com
Fri Feb 20 23:38:40 PST 2009
code as below, assert can't terminate the program when main thread is
running, is it a bug or i miss something?
import tango.core.Thread;
void test()
{
while(1) {
assert(false);
//throw new Exception("test");
}
}
void main() {
auto thread = new Thread(&test);
thread.start();
//if i remove the 3 lines below, then every thing work as expected
while(1) {
Thread.sleep(100); }
}
More information about the Digitalmars-d
mailing list