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 6024eaa commit d9e4b00Copy full SHA for d9e4b00
1 file changed
multidict/_multilib/state.h
@@ -130,9 +130,10 @@ get_mod_state_by_def(PyObject *self)
130
static inline uint64_t
131
NEXT_VERSION(mod_state *state)
132
{
133
- return atomic_fetch_add_explicit(
134
- &state->global_version, 1, memory_order_relaxed) +
135
- 1;
+ /* threads have the ability to screw with the global version,
+ * using an atomic variable ensures the global version is
+ * always accurate. */
136
+ return atomic_fetch_add(&state->global_version, 1) + 1;
137
}
138
139
#ifdef __cplusplus
0 commit comments