On 26/10/2016 11:03 PM, dm wrote:
On Wednesday, 26 October 2016 at 09:43:10 UTC, rikki cattermole wrote:
```D
void entryPoint(alias func)() {
try {
func();
} catch (Exception e) {
import std.stdio;
writeln(e.toString());
}
}
void main() {
auto tid = spawn(&entryPoint!someFunc);
// ...
}
```
Well... This code shows me:
object.Exception@thread.d(6): I'm an exception
----------------
But my main thread still working :(
Why so strange default behavior do not kill other threads in case some
of threads raise exception?
But thanks anyway.
If you throw an error it should crash the entire application.
But really you need to set up sync points within your application to
allow it to die gracefully.