The behavior is similar with the forks module.
use strict; use warnings; use forks; sub worker { print "Worker thread started.\n"; while(1){} } my $proc = threads->create(\&worker); print "Setting alarm.\n"; $SIG{ALRM} = sub { print "Alarm!\n" }; alarm 2; print "Joining.\n"; $proc->join();
Output
Setting alarm. Joining. Worker thread started. Alarm!
Kind regards, Mario.
In reply to Re^2: Why does threads::join block SIGALRM
by marioroy
in thread Why does threads::join block SIGALRM
by CDahn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |