Skip to content
Merged
Changes from 1 commit
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
Next Next commit
socket.getnameinfo should release the GIL
  • Loading branch information
njsmith committed May 8, 2023
commit 01a232b6d3c1a2fbc2c88214d7359fb308455c51
2 changes: 2 additions & 0 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down