Hi everyone,

I'm new to libuv and I know that  is not thread-safe except  u
v_async_send().

I'm writing a program(with linux c) that will create a thread(the loop 
thread) for uv_run(), which receives commands from a socket fd for creating 
or removing timers from the same loop.The Main thread will send commands 
through another socket fd to control timers creating/removing on the loop.

I wonder that is it safe to add a new timer to a loop in a uv_poll_t 
callback which also on the same loop?

in the callback should I call uv_stop() the loop first , add a new timer to 
loop and uv_run() the loop again?or It is safe to add a timer directly 
without uv_stop() and uv_run() the loop?

thanks

-- 
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