![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re: 'better mousetrap': how to perform timed eventby tachyon (Chancellor) |
on Apr 23, 2003 at 02:09 UTC ( #252428=note: print w/replies, xml ) | Need Help?? |
Why not just fork off a process to wait around and do the stuff?
Obviously once check_for_event() has returned a true value for an event once you want to make sure it returns false for that event the next call or you will fork() your system to death. Depending on the frequency of events and the sleep time you can potentially have a steadily increasing burden of waiting kids build up. Another option is to have a second parallel process to which you can send instructions. This process is in and endless loop waiting for instructions and executing them. You would probably pass it the instruction and an exec time which it stores in memory/file/DB and queries as required. Once an intruction has been processed you delete it. cheers tachyon s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In Section
Seekers of Perl Wisdom
|
|