[Catalyst] RFC: C::P::Alarm (was Re: timeouts)

Peter Karman peter at peknet.com
Thu May 4 20:17:25 CEST 2006


Coming soon to your local CPAN mirror: Catalyst::Plugin::Alarm

The Alarm plugin implements Sys::SigAction for Catalyst. It uses the 
Catalyst::Alarm namespace, and adds 2 methods to the Request object: 
timeout() and alarm().

If you Just Can't Wait, you can get it here:

http://peknet.com/~karpet/Catalyst-Plugin-Alarm-0.01.tar.gz

Comments & patches welcome.

pek

Peter Karman scribbled on 4/14/06 10:03 AM:
> 
> Yuval Kogman scribbled on 4/14/06 4:09 AM:
> 
>> Either way, Catalyst does not (currently) make use of 'alarm'
>> anywhere. The problem with alarms is that they're process global. I
>> don't knoww how this behaves in mod_perl, but you should find out on
>> e.g. the mod_perl mailinglist/channel/manual.
> 
> http://modperlbook.org/html/ch06_10.html
> 
> uses the same example of alarm(timeout)/code/alarm(0) that you 
> mentioned. That same example is also shown in the DBI pod, where it is 
> recommended not to use it. :) Instead it points at Sys::SigAction, which 
> is also (I see from cpan) used by DBIx::HA.
> 
> So it seems like that alarm() use is not so much an issue for mod_perl, 
> but moreso for DBI.
> 
> I've started on an Alarm plugin. Will post code when I've tested thoroughly.
> 
> thanks.
> 
> pek
> 

-- 
Peter Karman  .  http://peknet.com/  .  peter at peknet.com



More information about the Catalyst mailing list