2014-05-24 17:00 GMT+02:00 Iñaki Baz Castillo <[email protected]>:
> I run a loop in which there are, let say, a TCP server and a
> UnixSocket socket. Before I call uv_run() I cannot be sure whether the
> handles will properly start or not (it may happen "too much open
> files", "address in use" or whatever error).
>
> So, I need a way to notify other thread that this loop is already
> working without errors. Should I run a uv_check (or uv_prepare) once
> and notify that on its callback?


uv_check and uv_prepare don't are valid for me in this case:

- The check cb does not fire until blocking ends.

- The prepare db fires before other handles are even started (for
example, if I use uv_pipe_open() by passing it a bad fd, I get a read
cb inidicating the error much later than the prepare cb.

Should I run uv_run() with UV_RUN_NOWAIT and use a uv_check (so in its
cb I can be 100% sure that other handles won't fail later)?


-- 
Iñaki Baz Castillo
<[email protected]>

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

Reply via email to