in reply to Alarm::Concurrent
Are you planning on submitting your Alarm::* packages to the CPAN? You should.
One additional feature that I implemented in his code (which you may find useful to implement) is to have repeated events triggered; that is, if you need to have something go off every 5 seconds rather than just once 5 seconds from now, you can do that.
The way I did it was rather cheesy, but works: Each handler has a callback (typically a closure) and some associated data structure with metadata about the callback. If it is a repeated event, the handler just reschedules itself before it invokes the callback.
I really enjoyed reading your submission!
-Collin
|
|---|