new 4-heap code - please give it a try

Marc Lehmann schmorp at
Thu May 8 22:49:43 CEST 2008

On Wed, May 07, 2008 at 05:22:03PM -0500, Brandon Black <blblack at> wrote:
> Here's some simple demo code that seems to exhibit the issue I'm seeing 
> with cvs's timers, using two single-shot timers of 3 and 10 seconds. 
> Switching the order of the ev_timer_start()s makes it behave better.

Yes, I just hit a similar problem, too, the 4-heap upheap function is
buggy. Similarity of code (to the 2-heap variant) can be deceiving :/
Should now be fixed now in CVS.

Thanks a lot for your test program (my own test is much more clumsy :).

(I'll probably add it as a testcase as well, as the existing timer tests
didn't catch it due to the use of enough timers).

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list