AnyEvent driver for Prima

ambrus ambrus at math.bme.hu
Fri Dec 16 11:34:51 CET 2016


2016-12-16 09:19 időpontban Dmitry Karasik ezt írta:
> Hello all,
> 
> Thank you for your input, I think I manager to incorporate all of it.

Wow, this will make Corion's work of writing the wrapper much easier.  
Thank you.

> - Prima::Timer's onTick event will guarantee that it won't be
> triggered after stop() call (so you won't need destroy() to be
> bulletproof)

Does it also guarantee that if you change the timeout to much higher 
after the first call, using the timeout method, then the timer won't be 
triggered soon?  For example,

     $watcher = AnyEvent->timer(after => 0, interval => 60, cb => 
$callback)

will have to guarantee that there's only one early call.

> - Prima::Component->idle_message method added. Calling this method
> will insert the component (once) to the global idle list,
> and when the loop becomes idle, it's onIdle callback will be called,
> once, and the the component will be removed from the list.
> However I'm note sure though that I've got the idle semantics right,
> so if you think that there's something that can be made better,
> do say.

AnyEvent's idle watchers are repeating, that is, they don't get removed 
from the idle list until the watcher is destroyed.  That's not a big 
difference though, the wrapper can implement either behavior from the 
other.

> You're welcome to give it a try and see how these things are working
> for you.

That will be Corion's job.

-- Ambrus





More information about the anyevent mailing list