Libev don't use kqueue polling many sockets.

Marc Lehmann schmorp at
Thu Mar 26 10:01:57 CET 2009

On Thu, Mar 26, 2009 at 11:53:50AM +0300, blacksand blacksand <blacksand at> wrote:
>  Hello, i have problem with using kqueue for polling sockets.
>  I make loop = ev_default_loop(EVBACKEND_KQUEUE); to be use kqueue(), but libev continues use default backend poll(), i see it using utilities "truss", "top". My system FreeBSD 6.2, libev versions 3.43 3.53. 
>  Sorry, if i bad read manual and Thanx.


did you compile libev with kqueue support (check the result of
ev_supported_backends ())?

Did you create the default loop before? If the default loop exists
already, calling ev_default_loop will just reutrn it - try with a
non-default loop maybe?

Did you specify LIBEV_FLAGS in your environment? If yes, then they will
override the flags.

If the above fails to help you, can you provide a test program and truss
output of it starting up?

Note that you should really avoid using a known-to-be-broken interface for
the default loop, unless you are really sure nothing else will use the
default loop with soemthing that might not work.

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

More information about the libev mailing list