Thanks to visit codestin.com Credit goes to github.com
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 2d3e018 commit adb5e13Copy full SHA for adb5e13
Include/internal/pycore_dict.h
@@ -231,12 +231,10 @@ dict_next_version(PyInterpreterState *interp)
231
PyThreadState *tstate = PyThreadState_GET();
232
uint64_t cur_progress = (tstate->dict_global_version &
233
(THREAD_LOCAL_DICT_VERSION_BATCH - 1));
234
-
235
if (cur_progress == 0) {
236
uint64_t next = _Py_atomic_add_uint64(&interp->dict_state.global_version,
237
THREAD_LOCAL_DICT_VERSION_BATCH);
238
- tstate->dict_global_version = next + THREAD_LOCAL_DICT_VERSION_BATCH;
239
- return next;
+ tstate->dict_global_version = next;
240
}
241
return tstate->dict_global_version += DICT_VERSION_INCREMENT;
242
0 commit comments