[libuv] Re: Suggestion for v2: uv_async_send

2017-05-04 Thread Bernardo Ramos
Implementation of uv_callback here: https://github.com/litesync/uv_callback -- 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 libuv+unsubscr...@googlegroups.com. To post

[libuv] Re: Suggestion for v2: uv_async_send

2016-09-16 Thread Bernardo Ramos
This last idea also solves the problem of uv_async_send not being thread safe. If we use the LIBUV_ASYNC_USE_QUEUE option on it, then it can be called even by many worker threads at the same time. This is another use case I did not put in the last e-mail. -- You received this message because

[libuv] Re: Suggestion for v2: uv_async_send

2016-09-16 Thread Bernardo Ramos
I have another idea: What about the coalescing calls in the uv_async_send to be optional? So we can choose if the calls will coalesce or not. This could be set in uv_async_init. Because in some cases it is useful, as when the worker thread wants just to notify progress to the main thread. li

[libuv] Re: Suggestion for v2: uv_async_send

2016-09-16 Thread Bernardo Ramos
Hi Guys! It is nice to see that you already have done something in a similar direction. About the uv_async_send, here is what I was thinking about: Instead of using this: async.data = my_data_ptr; uv_async_send(&async); We would include the data pointer in the uv_async_send call: