Re: Libev: embeding within a 'foreign' event loop

2014-05-01 Thread Marc Lehmann
On Fri, May 02, 2014 at 01:19:42AM +0400, Nick Zavaritsky wrote: > There is one thing that still bothers me: now it takes two epoll_wait() calls > for Nginx to fetch the events > instead of one. (One epoll_wait() in libev plus another epoll_wait() for the > nested epoll fd maintained > solely b

Re: Fork watcher will not be called if fork() is invoked in prepare watcher callback.

2014-05-01 Thread Marc Lehmann
On Thu, May 01, 2014 at 04:33:40PM +0800, 李晓岚 wrote: > Considering this scenario, loop_init called without EVFLAG_FORKCHECK, > then register some fork and prepare watchers and start them. At a > certain point, in prepare watcher callback fork() is called, and in > child process ev_loop_fork() is

Libev: embeding within a 'foreign' event loop

2014-05-01 Thread Nick Zavaritsky
Hi! I realy love the flexibility and the great design of libev, however I am a bit puzzled with the event loop embeding. The problem is that I want to mix and match code that uses libev event loop with the code tailored for a very different event loop environment, all in the same thread. This

Fork watcher will not be called if fork() is invoked in prepare watcher callback.

2014-05-01 Thread 李晓岚
Hi, there, Considering this scenario, loop_init called without EVFLAG_FORKCHECK, then register some fork and prepare watchers and start them. At a certain point, in prepare watcher callback fork() is called, and in child process ev_loop_fork() is also called honestly. Oops, the callbacks of fork wa