Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Alternatives to Mixing Alarm and Sleepby ruzam (Curate) |
on Feb 20, 2010 at 01:39 UTC ( [id://824306]=note: print w/replies, xml ) | Need Help?? |
If you're looping with a sleep (instead of actually hanging on a blocking function to return) then I think you just want to just do away with the alarm all together and keep a loop counter.
The alarm is more useful if you have to break out of a blocking function, in which case you probably wouldn't be using sleep anyway. Update... On re-read, it sounds like you don't want to get caught hanging on is_it_done_yet(). In which case I think you want to alarm this function separately in an eval.
In Section
Seekers of Perl Wisdom
|
|