On Sun, Jun 18, 2017 at 3:10 AM, doa379 <doa...@gmail.com> wrote:
> I am curious about these two methods of offsetting operations into separate
> threads. What's the real difference and which method is preferable?
> From reading the docs, can't all operations be done using either uv_work or
> uv_async? Looking at the lazy_fib and download_progress examples:
>
> https://nikhilm.github.io/uvbook/threads.html

uv_queue_work() performs work in a thread pool.  You call it from the
event loop thread.

uv_async_send() is for waking up the event loop.  You can call it from
the event loop thread but it's mainly for signalling the event loop
thread from another thread.

-- 
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 to this group, send email to libuv@googlegroups.com.
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to