http://www.perlmonks.org?node_id=1046316

meena has asked for the wisdom of the Perl Monks concerning the following question:

Alarm::Queued methods like setalarm,clearalarm not working when I use them in Perl threads;When I create a thread and want to setalarm it doesnt work
use threads; my $call = threads->create(\&methodinvoke); my @ReturnData = $call->join(); print('Thread returned ', join(', ', @ReturnData), "\n"); sub methodinvoke { use Alarm::Queued qw( :OVERLOAD :ALL ); setalarm(2, sub { print "bing" }); }