Can I use ev_async in multiprocess context?

Marc Lehmann schmorp at schmorp.de
Sun Jul 27 09:51:01 CEST 2014


On Sun, Jul 27, 2014 at 04:59:54AM +0000, Fw Lei <fwlei at live.com> wrote:
> But I want use multiprocess model, in my opinion just put ev_loop and all
> watches in shared memory, that will be OK.

Probably, but...

> My question is, how can I put the default ev_loop into shared memory?

You can't :)

You can create an eventfd (pipe, socketpair...) and use an I/O watcher on
that though, which is portable.

-- 
                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 libev mailing list