Re: Correctly pass watcher to another loop

2012-06-24 Thread Marc Lehmann
On Sun, Jun 24, 2012 at 04:10:41PM +0400, Vladimir Afinello vovan...@gmail.com wrote: I pass a group of watchers at a time (at least 5), so at this moment I'm in a callback of a one of that watchers. That is no problem - after you stop() a watcher the loop will not access it in any way

Re: Correctly pass watcher to another loop

2012-06-24 Thread Vladimir Afinello
Should I wake the current thread loop to perform stop() on the other watchers in a group? I am not sure what that means, but again, if the watchers are stopped, then the loop will no longer access them. I mean, when I receive some data from one client in it's watcher receive callback - I

Re: Correctly pass watcher to another loop

2012-06-24 Thread Vladimir Afinello
Thanks a lot for your answers. The problem seems to desappear since I started to wake the current thread loop after stopping a group of watchers and also splitted one read/write watcher into 2 different watchers. Did it just in case, but it seems to work now. Best regards, Vladimir

Calling ev_async_send() from multiple threads.

2012-06-24 Thread Marek Denis
Hi, As far as I understood calling ev_async_send() on one watcher, but from different threads is a safe technique. However I am not really sure, whrther those calls will trigger callback functions the exact number of times the ev_async_send() was called? I am talking about the situation when