kevmcs has asked for the wisdom of the Perl Monks concerning the following question:
If I substitute cond_timedwait($signal, time() + 30); for the alarm eval codeblock on 5.8.3 everything is well. Any help is much appreciated.Thread1- lock($signal); eval { local $SIG{ALRM} = sub { die "alarm\n" }; alarm 30; cond_wait($signal); alarm 0; }; if ($@) { print "timed out\n"; }else{ print "did not time out"; } Thread 2; cond_signal($signal);
|
|---|