Ok, then what exactly is the solution to this problem. What I need is that there must be 1 uv_write() call corresponding to the data received in msgrcv() call.
Regards, Sarav On Tuesday, November 26, 2013 4:12:51 PM UTC+5:30, Saúl Ibarra Corretgé wrote: > On 11/26/13 11:26 AM, Sarav Sandhu wrote: > > Well I did know that function but I've heard that "libuv may also > > combine multiple calls to uv_async_send and invoke your callback only > > once. The only guarantee that libuv makes is � The callback function > is > > called /at least once/ after the call to uv_async_send." at this link : > > http://nikhilm.github.io/uvbook/threads.html#inter-thread-communication<http://www.google.com/url?q=http%3A%2F%2Fnikhilm.github.io%2Fuvbook%2Fthreads.html%23inter-thread-communication&sa=D&sntz=1&usg=AFQjCNHYTDM26eFT3F-QZZpdDJ0XavhzLA> > > > > > > Now the example supplied with the book mentioned on the link has a > > global uv_async_t object and the uv_async_send calls are > > made repetitively using this global object. I want to know if the > > problem mentioned above will go away if the object is locally declared > > in user thread. Book Example Code: > > https://github.com/nikhilm/uvbook/blob/master/code/progress/main.c<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fnikhilm%2Fuvbook%2Fblob%2Fmaster%2Fcode%2Fprogress%2Fmain.c&sa=D&sntz=1&usg=AFQjCNF6lqoOaZbkr74M9mjEaDQvANMJZg> > > > > > > It's not really safe to attach something to async->data and then use it > in the callback, libuv could coalesce the calls and then the pointer > would be overwritten before you get a chance to read it. > > -- > Sa�l Ibarra Corretg� > http://bettercallsaghul.com<http://www.google.com/url?q=http%3A%2F%2Fbettercallsaghul.com&sa=D&sntz=1&usg=AFQjCNG4oksE5WazGuLiKu5OevbsdMTRjw> > > -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/libuv. For more options, visit https://groups.google.com/groups/opt_out.
