Where's AnyEvent's run_one_timeslice?

Marc Lehmann schmorp at schmorp.de
Sat Aug 8 05:06:59 CEST 2015


On Fri, Aug 07, 2015 at 03:39:31PM +0100, djk <djk at tobit.co.uk> wrote:
> >For the record, this is about porting Curses::UI to AnyEvent, there's
> >a deja-vu here, and running the POE version in AnyEvent worked ok for
> >a while, but I'd rather have a native port:
> 
> So how does Mojo::IOLoop->next_tick do it then?

From a cursory look at Mojolicious, the corresponding method would be
"one_tick", not "next_tick".

next_tick can probably be done in anyevent via "AE::timer 0, 0, $cb",
although AnyEvent hasn't made up it's mind about whether this is
guaranteed to work with all event loops, but I assume if it's pushed, it
would handle zero and negative time outs "as expected".

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list