Hi guys!

I have a suggestion for v2:

To change the uv_async_send() to contain a queue inside it so we don't need 
to implement it in our code.

In this way we could just call uv_async_send() and the callback would be 
fired in the main (or other) event loop with the dequeued pointer from the 
queue.
 
I guess it would be much easier for the libuv users as we would not have to 
care about creating a queue, using mutexes and even about the coalescing of 
calls. All this could be handled automatically by libuv.

What do you think about this?

Maybe in the future it could even have a lock-free approach to this instead 
of using a mutex to avoid deadlocks, using *lib*lfds.org or other library 
(Well, I know this is a dangerous zone. We can just use mutexes for now).

Also, if the queue has a limited size and it is full then function should 
either block until succeeded or return an error.

What is better, let it the way it is or make it easier to use?

-- 
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 https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to