joyent/libuv — Issue #302: HAVE_GETADDRINFO_THREADSAFE no longer does anything
Author: paddybyers
Created: 2012-01-31 23:34:49+00:00
State: open

In the ares config.h this option exists but in libuv it does nothing.

in Android (versions before 3.0) getaddrinfo is not thread-safe and it would be good to enable this or an equivalent option.

Would a patch for that be welcome?

If so - any thoughts on implementation? Obviously we can just put the getaddrinfo call so it runs in the event loop thread instead of in a helper thread but I don't know if there are other options. Putting a lock around the call to getaddrinfo and then synchronising every other operation that potentially interferes on that lock would be as bad, or worse, since those operations would then interfere even if nobody is calling getaddrinfo.