mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-128100: Use atomic dictionary load in _PyObject_GenericGetAttrWithDict
(GH-128297)
This commit is contained in:
parent
fe4dd07a84
commit
47d2cb8eb7
1 changed files with 4 additions and 0 deletions
|
@ -1717,7 +1717,11 @@ _PyObject_GenericGetAttrWithDict(PyObject *obj, PyObject *name,
|
|||
else {
|
||||
PyObject **dictptr = _PyObject_ComputedDictPointer(obj);
|
||||
if (dictptr) {
|
||||
#ifdef Py_GIL_DISABLED
|
||||
dict = _Py_atomic_load_ptr_acquire(dictptr);
|
||||
#else
|
||||
dict = *dictptr;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue