diff options
author | Victor Stinner <vstinner@python.org> | 2020-05-28 15:23:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 15:23:39 (GMT) |
commit | 0de437de6210c2b32b09d6c47a805b23d023bd59 (patch) | |
tree | 26232435efcff1009cec6eedf6718eb0266e05ba /Misc | |
parent | 753643205a28531fd43ef36b40b86282ae6956a7 (diff) | |
download | cpython-0de437de6210c2b32b09d6c47a805b23d023bd59.zip cpython-0de437de6210c2b32b09d6c47a805b23d023bd59.tar.gz cpython-0de437de6210c2b32b09d6c47a805b23d023bd59.tar.bz2 |
bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177)
On macOS, socket.getaddrinfo() no longer uses an internal lock to
prevent race conditions when calling getaddrinfo(). getaddrinfo is
thread-safe is macOS 10.5, whereas Python 3.9 requires macOS 10.6 or
newer.
The lock was also used on FreeBSD older than 5.3, OpenBSD older than
201311 and NetBSD older than 4.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-05-18-15-38-25.bpo-25920.PxrLY8.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-05-18-15-38-25.bpo-25920.PxrLY8.rst b/Misc/NEWS.d/next/Library/2020-05-18-15-38-25.bpo-25920.PxrLY8.rst new file mode 100644 index 0000000..cc60e97 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-05-18-15-38-25.bpo-25920.PxrLY8.rst @@ -0,0 +1,7 @@ +On macOS, when building Python for macOS 10.4 and older, which wasn't the case +for python.org macOS installer, :func:`socket.getaddrinfo` no longer uses an +internal lock to prevent race conditions when calling ``getaddrinfo()`` which +is thread-safe since macOS 10.5. Python 3.9 requires macOS 10.6 or newer. The +internal lock caused random hang on fork when another thread was calling +:func:`socket.getaddrinfo`. The lock was also used on FreeBSD older than 5.3, +OpenBSD older than 201311 and NetBSD older than 4. |