lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Nathan Angelacos
> Sent: zondag 12 april 2015 21:56
> To: lua-l@lists.lua.org
> Subject: Re: efficient timers
> 
> On 04/12/2015 03:49 PM, Nagaev Boris wrote:
> > On Sun, Apr 12, 2015 at 7:29 PM, Thijs Schreijer
> > <thijs@thijsschreijer.nl> wrote:
> >> I’m looking for an efficient timer mechanism in Lua. Does anyone know of
> any
> >> Lua based timing-wheel implementations? (before I roll my own)
> >
> 
> I assume you are referring to an implementation of this:
> 
>   http://www.cs.columbia.edu/~nahum/w6998/papers/sosp87-timing-wheels.pdf
> 
> With a recent C implementation here:
> 
> http://www.25thandclement.com/~william/projects/timeout.c.html
> 
> 
> 
> I personally haven't seen anything; but if you roll your own, I'm
> interested!
> 
> 

Yes, that is what I'm looking for. I know William created an advanced one for the cqueues project. But I would like a pure Lua version. I wrote CopasTimer in the past, but that was intended for timers being scheduled and actually being executed, hence its linked-list implementation sufficed at the time.
But now I need one for timeout management, which requires frequent scheduling and cancelling, and only in rare cases actually executing them. Which is a whole different ballgame performance wise, hence my interest for a timing-wheel algorithm implementation.

Thijs