Skip to content

[3.11] GH-104308: socket.getnameinfo should release the GIL (GH-104307) #104313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
GH-104308: socket.getnameinfo should release the GIL (GH-104307)
* socket.getnameinfo should release the GIL

* 📜🤖 Added by blurb_it.

---------

(cherry picked from commit faf1962)

Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and miss-islington committed May 8, 2023
commit e6ae758ba65107cc6323cafe49a22e97da74baf3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:func:`socket.getnameinfo` now releases the GIL while contacting the DNS server
2 changes: 2 additions & 0 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -6737,8 +6737,10 @@ socket_getnameinfo(PyObject *self, PyObject *args)
}
#endif
}
Py_BEGIN_ALLOW_THREADS
error = getnameinfo(res->ai_addr, (socklen_t) res->ai_addrlen,
hbuf, sizeof(hbuf), pbuf, sizeof(pbuf), flags);
Py_END_ALLOW_THREADS
if (error) {
set_gaierror(error);
goto fail;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy