We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0f77c4 commit 58d99e7Copy full SHA for 58d99e7
Objects/setobject.c
@@ -793,12 +793,12 @@ frozenset_hash(PyObject *self)
793
PySetObject *so = _PySet_CAST(self);
794
Py_uhash_t hash;
795
796
- if (so->hash != -1) {
797
- return so->hash;
+ if (FT_ATOMIC_LOAD_SSIZE_RELAXED(so->hash) != -1) {
+ return FT_ATOMIC_LOAD_SSIZE_RELAXED(so->hash);
798
}
799
800
hash = frozenset_hash_impl(self);
801
- so->hash = hash;
+ FT_ATOMIC_STORE_SSIZE_RELAXED(so->hash, hash);
802
return hash;
803
804
0 commit comments