diff options
author | Nathaniel J. Smith <njs@pobox.com> | 2023-05-08 23:27:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 23:27:20 (GMT) |
commit | faf196213e60d8a90773e9e5680d3252bd294643 (patch) | |
tree | 1ffbbca9b77a1843a6a953be58888fe3fa1d2ee1 /Modules | |
parent | 4541d1a0dba3ef0c386991cf54c4c3c411a364c0 (diff) | |
download | cpython-faf196213e60d8a90773e9e5680d3252bd294643.zip cpython-faf196213e60d8a90773e9e5680d3252bd294643.tar.gz cpython-faf196213e60d8a90773e9e5680d3252bd294643.tar.bz2 |
GH-104308: socket.getnameinfo should release the GIL (#104307)
* socket.getnameinfo should release the GIL
* 📜🤖 Added by blurb_it.
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 6021959..c11fb44 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -6883,8 +6883,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) { socket_state *state = get_module_state(self); set_gaierror(state, error); |