Skip to content
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,10 +1238,10 @@ _Py_dict_lookup(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject **valu
return ix;
}

#ifdef Py_GIL_DISABLED
static inline void
ensure_shared_on_read(PyDictObject *mp)
{
#ifdef Py_GIL_DISABLED
if (!_Py_IsOwnedByCurrentThread((PyObject *)mp) && !IS_DICT_SHARED(mp)) {
// The first time we access a dict from a non-owning thread we mark it
// as shared. This ensures that a concurrent resize operation will
Expand All @@ -1253,8 +1253,8 @@ ensure_shared_on_read(PyDictObject *mp)
}
Py_END_CRITICAL_SECTION();
}
#endif
}
#endif

static inline void
ensure_shared_on_resize(PyDictObject *mp)
Expand Down