maybe i should title it assert or execption can't terminate the prog in
multithread:-)
yes, the main thread is still running, but i want the program terminated
when a assert failure or exception happened whatever. otherwise i have to
notify the main thread, i think that's a littel inconvenient.
"liyu" <[email protected]> wrote in message
news:[email protected]...
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); }
}