On Wednesday, 26 October 2016 at 08:42:02 UTC, dm wrote:
I want to kill all my threads if it is unhandled exception.
How can I do that?

The spawnLinked function might help:

http://dpldocs.info/experimental-docs/std.concurrency.spawnLinked.html

http://dlang.org/phobos/std_concurrency.html#spawnLinked

" This new thread is linked to the calling thread so that if either it or the calling thread terminates a LinkTerminated message will be sent to the other, causing a LinkTerminated exception to be thrown on receive()."


At least that sounds basically right.

Reply via email to