Hi,

On 4/17/14 8:03 PM, Susheel Aroskar wrote:

Hi Saul,

Thank you so much for the prompt reply! One more follow up question :)
Is it safe to call uv_close() multiple times on the same uv_tcp_t as
long as it is not free'd? Will the subsequent uv_close() be taken as
NOOPs? It is admittedly bad design, but I'm afraid in some cases two
different parts of my code can each call uv_close() on the same handle
unaware of each other. Do I need to guard it with some "is_being_closed"
variable or is it okay to call uv_close() multiple times?


You cannot call uv_close multiple times for the same handle. You can check if the handle is being closed with uv_is_closing (before you free it, that is).


Cheers,

--
Saúl Ibarra Corretgé
http://bettercallsaghul.com

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