local $SIG{'KILL'} = sub { threads->exit(); };Why? If all you are going to do is terminate, why not just let that happen?
Well, it will "just happen". SIGKILL can't be caught, blocked or ignored. The process will simply be forced to exit when a SIGKILL is sent, the sub will never be invoked. Unless, of course, you run that code on a very strange non-POSIX system with a different signals implementation.
Alexander
In reply to Re^6: RFC: Using 'threads' common aspects
by afoken
in thread RFC: Using 'threads' common aspects
by DeadPoet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |