mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
gh-130373: Avoid locking in _LOAD_ATTR_WITH_HINT (#130372)
Avoid locking in _LOAD_ATTR_WITH_HINT
This commit is contained in:
parent
00f0771e4d
commit
2984ff9e51
6 changed files with 72 additions and 46 deletions
|
@ -1009,6 +1009,9 @@ specialize_dict_access_hint(
|
|||
_PyAttrCache *cache = (_PyAttrCache *)(instr + 1);
|
||||
|
||||
_Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(dict);
|
||||
#ifdef Py_GIL_DISABLED
|
||||
_PyDict_EnsureSharedOnRead(dict);
|
||||
#endif
|
||||
|
||||
// We found an instance with a __dict__.
|
||||
if (_PyDict_HasSplitTable(dict)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue