I create a lot of threads, and I'm using
$SIG{INT} = \&catch_CtrlC;to handle ctrl+c exit.
I want to issue an event from catch_CtrlC to every running threads to exit elegantly(release resources before exit). How to realise this in the threads?
I mean: How to inform the thread that a Ctrl+C signal has been triggered and needs to prepare to exit?
In reply to How can perl thread exit elegantly by anaconda_wly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |