On Wed, Jun 01, 2011 at 12:43:58AM +0400, Alexey Borzenkov <[email protected]> 
wrote:
> Documentation of libev's ev_timer states that it will happen only
> after the timeout, and not at. Currently it introduces a very
> interesting problem, because if there are ev_timers that have "at"
> being equal to current time, then ev_loop will determine that

Which OS and backend is that? The only reaosnable way to handle that is
by introducing an OS/backend-specific fudge factor, as the poll function
should not return early (some misdesigned ones such as epoll do, and need
special handling).

> If I change "<" with "<=" in timers_reify, then it gets rid of
> unnecessary looping, but it seems like it might have been done to work

Well, that breaks libev's guarantees for timers, so not a good idea.

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

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to