POE or another event loop.

Event loops keep track of the timers required and use low level
functions to set alarm() for the one that'll happen soonest,
installing the next timer as part of it's trigger before calling the
original handler. Managing low level resources like IO, timers, etc
in light of concurrent operations is a problem with many solutions.
Look on the CPAN for POE, Event, Danga::Socket, Event::Lib and
probably a few others. Of these POE is the most high level, and even
has some wrapper kernels to work with some of the others I
mentioned. POE is more about a style for developing event based
programs, and comes with lots of modular components that fit with
that style.

Good luck.

On Thu, May 31, 2007 at 11:54:18 +0300, Meron Cohen wrote:
> Hi all,
> 
> I'm trying to implement 2 timers in a script. One that timeouts the time
> that the script runs and another one that timeouts the time that a
> command that runs on a card (embedded system). Anyway, for timers I use
> the $SIG{ALRM} and alarm. The problem is that the command "alarm" knows
> how to wait for one timer only (the second alarm destroy the first
> alarm). Do you know I to solve that problem?
> 
> _______________________________________________
> Perl mailing list
> [email protected]
> http://perl.org.il/mailman/listinfo/perl

-- 
  Yuval Kogman <[EMAIL PROTECTED]>
http://nothingmuch.woobling.org  0xEBD27418

Attachment: pgpe0UA8mzrgM.pgp
Description: PGP signature

_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to