mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-128277: remove unnecessary critical section from socket.close
(#128305)
Remove unnecessary critical section from `socket.close` as it now uses relaxed atomics for `sock_fd`.
This commit is contained in:
parent
d903b17499
commit
bb9d955e16
3 changed files with 23 additions and 11 deletions
|
@ -3386,7 +3386,6 @@ sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])");
|
|||
will surely fail. */
|
||||
|
||||
/*[clinic input]
|
||||
@critical_section
|
||||
_socket.socket.close
|
||||
self as s: self(type="PySocketSockObject *")
|
||||
|
||||
|
@ -3397,7 +3396,7 @@ Close the socket. It cannot be used after this call.
|
|||
|
||||
static PyObject *
|
||||
_socket_socket_close_impl(PySocketSockObject *s)
|
||||
/*[clinic end generated code: output=038b2418e07f6f6c input=9839a261e05bcb97]*/
|
||||
/*[clinic end generated code: output=038b2418e07f6f6c input=dc487e470e55a83c]*/
|
||||
{
|
||||
SOCKET_T fd;
|
||||
int res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue