Thread communication
"岩倉 澪" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 5 18:27:42 PDT 2015
On Wednesday, 5 August 2015 at 14:31:20 UTC, Marc Schütz wrote:
> It was a conscious decision not to provide a kill method for
> threads, because it is impossible to guarantee that your
> program is still consistent afterwards.
What about the situation where we want to kill worker threads off
when closing a program? For example, I have a program with a
thread that does some heavy computation in the background. When
the application is closed, I want it to abort that computation,
however I can't just slap a receiveTimeout in the worker thread
because it is doing its work in a parallel foreach loop.
More information about the Digitalmars-d-learn
mailing list