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

2014-05-03 Thread 李晓岚
Thanks to gevent expert Denis' clarification. On Sat, May 3, 2014 at 5:48 PM, Marc Lehmann wrote: > > It makes a lot of sense to forbid invocations of fork in prepare watchers - > basically, something has to give in: prepare watchers are meant to integrate > new event sources, and therefore need

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

2014-05-03 Thread Marc Lehmann
On Sat, May 03, 2014 at 12:49:23PM +0200, Denis Bilenko wrote: > > It seemed to make sense to do it prepare watcher. Are you saying that > doing this in idle watcher (with highest priority) would be more > appropriate? I don't know exactly what a greenlet is, but it really depends on what you a

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

2014-05-03 Thread Denis Bilenko
On Sat, May 3, 2014 at 11:48 AM, Marc Lehmann wrote: > On Sat, May 03, 2014 at 10:43:26AM +0800, 李晓岚 > wrote: >> > 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 :) >> >> Maybe you

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

2014-05-03 Thread Marc Lehmann
On Sat, May 03, 2014 at 10:43:26AM +0800, 李晓岚 wrote: > > 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 :) > > Maybe you know gevent. Gevent use libev as its event loop. When new > gr