8000 gh-128277: make globals variables thread safe in socket module by kumaraditya303 · Pull Request #128286 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-128277: make globals variables thread safe in socket module #128286

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 10 commits into from
Dec 31, 2024
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
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
kumaraditya303 committed Dec 28, 2024
commit 2463bbde345ab3b41138bdf9da2320f5577b7a84
3 changes: 2 additions & 1 deletion Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ Local naming conventions:
#include "Python.h"
#include "pycore_capsule.h" // _PyCapsule_SetTraverse()
#include "pycore_fileutils.h" // _Py_set_inheritable()
#include "pycore_pyatomic_ft_wrappers.h"
#include "pycore_moduleobject.h" // _PyModule_GetState
#include "pycore_time.h" // _PyTime_AsMilliseconds()
#include "pycore_pyatomic_ft_wrappers.h"

#ifdef _Py_MEMORY_SANITIZER
# include <sanitizer/msan_interface.h>
Expand Down Expand Up @@ -573,6 +573,7 @@ static int sock_cloexec_works = -1;

#define SET_SOCK_CLOEXEC_WORKS(value) FT_ATOMIC_STORE_INT_RELAXED(sock_cloexec_works, value)
#define GET_SOCK_CLOEXEC_WORKS() FT_ATOMIC_LOAD_INT_RELAXED(sock_cloexec_works)

#endif

static inline socket_state *
Expand Down
Loading
0