mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-126366: fix thread safety of dict key iterator (#132693)
This commit is contained in:
parent
7fd708b727
commit
4c3d187d9f
1 changed files with 1 additions and 1 deletions
|
@ -5495,7 +5495,7 @@ dictiter_iternext_threadsafe(PyDictObject *d, PyObject *self,
|
|||
ensure_shared_on_read(d);
|
||||
|
||||
i = _Py_atomic_load_ssize_relaxed(&di->di_pos);
|
||||
k = _Py_atomic_load_ptr_relaxed(&d->ma_keys);
|
||||
k = _Py_atomic_load_ptr_acquire(&d->ma_keys);
|
||||
assert(i >= 0);
|
||||
if (_PyDict_HasSplitTable(d)) {
|
||||
PyDictValues *values = _Py_atomic_load_ptr_relaxed(&d->ma_values);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue