Linux signal handling - notifying a condition variable
Adam D. Ruppe
destructionator at gmail.com
Thu Mar 15 17:12:24 UTC 2018
On Thursday, 15 March 2018 at 16:51:59 UTC, Jim King wrote:
> In going through the signal documentation it looks like the
> signal handler must be a "nothrow @nogc" variety.
Looks like notify actually can throw an exception... the way I
usually do signal handlers is just set a global variable:
__global bool interrupted = false;
void sigint_handler() { interrupted = true; }
then in the main loop check that periodically... idk if that'd
work well withthe condition variable though, I have never
actually used that...
More information about the Digitalmars-d
mailing list