Skip Menu |

This queue is for tickets about the POE CPAN distribution.

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

Owner: avriette [...]
Requestors: DON [...]
don [...]

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


Date: Tue, 28 Oct 2003 20:16:23 -0800
From: Don Armstrong <don [...]>
To: bug-POE [...]
Subject: Alarm status / Setting only one alarm
Download (untitled) / with headers
text/plain 980b
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
Download signature.asc
application/pgp-signature 189b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 551b
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
Download (untitled) / with headers
text/plain 179b
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.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to