[Issue 3462] Add a clean way to exit a process.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Sep 17 09:42:57 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=3462
--- Comment #10 from Sean Kelly <sean at invisibleduck.org> ---
If we assume that people are multithreading using std.concurrency we could send
"terminate" messages to all running threads, similar to the OwnerTerminated
message today.
Beyond that... we could maybe send a signal to all running threads on
supporting platforms and have those signal handlers throw. Throwing from a
signal handler doesn't always work (it's not explicitly supported) but it does
on some OSes.
The only other thing I can think of would be to build in some flag that threads
voluntarily check periodically. But it's just as easy to do this on a
per-application basis. There's really little value in building such a flag
into Druntime.
--
More information about the Digitalmars-d-bugs
mailing list