Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 4231
Status: rejected
Priority: 0/
Queue: POE

People
Owner: avriette [...] gmail.com
Requestors: DON [...] cpan.org
don [...] donarmstrong.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)

Attachments


Date: Tue, 28 Oct 2003 20:16:23 -0800
From: Don Armstrong <don [...] donarmstrong.com>
To: bug-POE [...] rt.cpan.org
Subject: Alarm status / Setting only one alarm
Recently, I've found myself wishing for a $kernel->alarm() with the opposite effect that it has currently. That is, instead of clearing the previously set alarm and setting a new one, it only sets a new alarm if one doesn't exist. I see two ways to go about doing this: my @alarms = $kernel->alarms('alarm_name'); where @alarms is the list of alarms with the name 'alarm_name' as returned by $kernel->alarm_remove_all(); Alternatively: $kernel->alarm_soon('alarm_name',$time); (Hopefully someone can think of something better than _soon) which makes sure that 'alarm_name' is scheduled at $time or before. [Possibly deleting later alarms?] This is usefull to avoid delaying alarms indefinetly by repeated calls to $kernel->alarm() or adding useless alarms by calls to $kernel->alarm_add(). Don Armstrong -- It seems intuitively obvious to me, which means that it might be wrong -- Chris Torek http://www.donarmstrong.com http://www.anylevel.com http://rzlab.ucr.edu
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

I'm looking into adding this funtion for you requested for POE. Rocco mentioned that the usage of it would be for 'monotonic timers'. Have you had a chance to think of perhaps a better name for it than 'alarm_soon', which doesn't really seem to express what it does. I was thinking of mono_alarm, but that's also not wonderful. Also, some people have suggested that ->delay() could be used instead. Could you maybe give me some more context as to how you're using this function? It would be helpful for the implementation. thanks, alex alex@cpan.org
Sorry, Don. At long last I'm rejecting this wishlist item. While it's a useful feature, it can be implemented in a layer outside POE::Kernel, so I'm not adding it into the core.