On Tue, Aug 11, 2020 at 2:52 PM Jason Heeris <jason.hee...@gmail.com> wrote:
>
> After reading the API docs again, I think that a timer with delay = 0 and 
> repeat = 0 is essentially what I want to do - one for each message. Or 
> perhaps a uv_async_t and then an immediate async_send? The docs say that the 
> async handler can be invoked at any time after that call, including before 
> the calling function returns, but I assume that only applies when you're 
> calling it from a thread different to the one the main loop is running in?

Calling uv_async_send() from the callback is okay.

A uv_idle_t might be marginally more efficient (one fewer system call.)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/libuv/CAHQurc95EDZfMkaekEtXtCe%3D4bFG%3Dby18eng%2B5EsaWtq4Op0bQ%40mail.gmail.com.

Reply via email to