On 26/10/2016 9:42 PM, dm wrote:
Hi. I tried code below:import std.concurrency; import std.stdio; void func() { throw new Exception("I'm an exception"); } void main() { auto tID = spawn(&func); foreach(line; stdin.byLine) send(tID, ""); } I expect my application will die immediatly, but main thread still running and I don't see any errors. I want to kill all my threads if it is unhandled exception. How can I do that?
Simple, handle the exceptions on each thread.