-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/07/2014 11:05 PM, Haneef Mubarak wrote: > Is uv_stop()thread safe? Namely, if I have thread A running a loop > X via uv_run(loop_x, UV_RUN_DEFAULT), can I (safely) have thread > A's loop stopped by having thread B run uv_stop(loop_x)? >
Hi, No, uv_stop is not thread safe. The only thread safe function is uv_async_send, which you could call from another thread and then call uv_stop in its callback. Cheers, - -- Saúl Ibarra Corretgé bettercallsaghul.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQIcBAEBAgAGBQJTuxuJAAoJEEEOVVOum8BZi50P/24Gp7z3zov6QYtgqzemZDJZ l9vQTP9HUg9qWDFOGv/v2+Eb9Bl//g3qY4gpnf0VUqXnPiPJJTTdGvHAYXFuy2Rw 7eVA0Nm3IYFkf8jRObdmHypZryDyG24BHo8opYhJ/7tR8hSwbJOPzURiqhotYwWp vJYA9z7w4DRqEK94fMyYfYLA1ItnbY8qQ5cT7t5lvet5LiVk8irwubNNoXp3ZKxd Jbdv4KyXTAlBRCaLj9/HBmo0uaPyV2Fy4j+beU7jz4Az4rETQGj8TIVTBMeUndV1 mFUM9Y/DWt9UP1UDC9kBHB3cO+GsArdV4gU3Dt5WZRtfLB7mQ689tGkEZ+gp88ad gzSL7Es15mtiZf+ziaeKLmb+FD158WwKWg42pX3FC0LXug1C6DgITJbhehZ6sPj7 hBFYf8B58XjIvZm8dT8agiZM0HPeCJBD/4tCpiNaeDufloaBj9cQ3e7DpD3gqdgh /eJtLIxwXq7fAgvXSSL38witG/Uks5Rix5XzpIWbfmGQZ8yKAP5uFo4anTC3V5Fx VUK4J6LJ9Xycy2iwkoZHGN21oZY7Xu6E4ipseOmq1gGsGctFczSzzGQHhIeA5LyC amPz5IVB7PGRHjEbVBNo41OCJkYrENkI0bG8E5oUf4QhtEH2MN/c/+pRUygvNbL3 q7FB46OfsTcY8SkhG3Qn =x5Q3 -----END PGP SIGNATURE----- -- 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.
