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

2014-05-02 Thread 李晓岚
On Fri, May 2, 2014 at 3:05 PM, Marc Lehmann wrote: > Therefore, we decided to forbid invocations of ev_loop_fork from prepare > watchers. > > If you have a convincing use case that couldn't be served by starting an > ev_idle watcher and forking from there, we'd be interested in hearing > about it

Re: HTTP servers that run libev

2014-05-02 Thread Christian Parpart
On Thu, Jan 30, 2014 at 11:07 AM, Harm van Tilborg wrote: > Hey guys, > > I searched around a bit, and found that nxweb used to use libev as its > event backend, but doesn't do that anymore. Therefore I was wondering > whether you know of any HTTP server that is using libev as its > backend. > > I

Re: libev, multiple threads, and ev_async as notification vs valgrind/helgrind

2014-05-02 Thread Christian Parpart
Yes, that's all I wanted to know. So here I am on the safe side. Many thanks, Marc. Cheers, Christian Parpart. On Fri, May 2, 2014 at 4:36 PM, Marc Lehmann wrote: > On Fri, May 02, 2014 at 04:12:29PM +0200, Christian Parpart < > tra...@gmail.com> wrote: > > I hope somebody can tell me that thi

Re: libev, multiple threads, and ev_async as notification vs valgrind/helgrind

2014-05-02 Thread Marc Lehmann
On Fri, May 02, 2014 at 04:12:29PM +0200, Christian Parpart wrote: > I hope somebody can tell me that this is a false positive or what I might > be missing. Most likely, these are either bugs in helgrind (not emulating the memory fence instruction correctly) or simply a design limitation in helg

libev, multiple threads, and ev_async as notification vs valgrind/helgrind

2014-05-02 Thread Christian Parpart
Hey all, I am trying to find a race in my threaded app, so I decided to give valgrind+helgrind a try. My app is spawning N worker threads. each has its own event loop and nicely runs in parallel. Sometimes one worker needs to wakeup another worker in order to make sure it knows about something, s

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

2014-05-02 Thread Nick Zavaritsky
Hi! > You would have to be prepared to handle a change to the fd at basically > any time, including a change to no fd. Excuse me my ignorance I didn't know that it was so complex. Now I realize that when libev has to tear things down and rebuilds everything from scratch in effort to cure after fo

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

2014-05-02 Thread Marc Lehmann
On Thu, May 01, 2014 at 04:33:40PM +0800, 李晓岚 wrote: > Is this behavior is intended with any considerations or a bug? We discussed this behaviour, but we couldn't come up with a reason on why one would need to fork in a prepare watcher that couldn't be better served by starting an ev_idle watche