[talk] I improved CPython's DNS system with your help

Sujit K M kmsujit at gmail.com
Sat Dec 3 06:28:34 EST 2016


> http://bugs.python.org/issue25924

/* On systems on which getaddrinfo() is believed to not be thread-safe,
   (this includes the getaddrinfo emulation) protect access with a lock. */
#if defined(WITH_THREAD) && (defined(__APPLE__) || \
    (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
    defined(__OpenBSD__) || defined(__NetBSD__) || \
    defined(__VMS) || !defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif

Don't you think it is better get it an additioinal
defined(__DONT_KNOW_OS). I might be
wrong if you are using USE_GETADDRINFO_LOCK is specific to OS.



More information about the talk mailing list