Perfect ! Thanks Marc ! :-)
On Thu, Jul 11, 2013 at 9:03 AM, Marc Lehmann <[email protected]> wrote: > On Wed, Jul 10, 2013 at 05:05:45PM +0530, Aravindh Ramaswamy < > [email protected]> wrote: > > Correct but that would require synchronization mechanisms between two > > threads( as is the case for me) like mutexes and condition variables. > > Yes, but that's true for any communication between threads, or anything > that potentially runs in parallel. > > > I considered the use of the queue but since watchers can pass custom data > > as well > > by type casting, I thought of passing the data using ev_async watcher in > > ev_async_send > > first, ev_async_send is a synchronisation mechanism, and second, it has > no meaningful way to queue data that wouldn't require you to use another > synchronisatzion mechanism (like mutexes, atomic accesses &c). > > > and then the recipient event loop while invoking the async_cb can make > use > > of that information. > > Wont that work ? > > Sure, but you can't escape the fundamental need for some synchronisation > mechanism. > > -- > The choice of a Deliantra, the free code+content > MORPG > -----==- _GNU_ http://www.deliantra.net > ----==-- _ generation > ---==---(_)__ __ ____ __ Marc Lehmann > --==---/ / _ \/ // /\ \/ / [email protected] > -=====/_/_//_/\_,_/ /_/\_\ > -- Thanks and Regards, Aravindh.R
_______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
