8000 Merge branch 'gh-116397-freelist-localfix' into nogil-integration · colesbury/cpython@90b0d8f · GitHub
[go: up one dir, main page]

Skip to content

Commit 90b0d8f

Browse files
committed
Merge branch 'pythongh-116397-freelist-localfix' into nogil-integration
2 parents efa15ce + 2fb90fb commit 90b0d8f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Python/gc_free_threading.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,8 @@ gc_collect_internal(PyInterpreterState *interp, struct collection_state *state)
10581058
// Handle any objects that may have resurrected after the finalization.
10591059
_PyEval_StopTheWorld(interp);
10601060
err = handle_resurrected_objects(state);
1061+
// Clear free lists in all threads
1062+
_PyGC_ClearAllFreeLists(interp);
10611063
_PyEval_StartTheWorld(interp);
10621064

10631065
if (err < 0) {
@@ -1160,9 +1162,6 @@ gc_collect_main(PyThreadState *tstate, int generation, _PyGC_Reason reason)
11601162
n+m, n, d);
11611163
}
11621164

1163-
// Clear free lists in all threads
1164-
_PyGC_ClearAllFreeLists(interp);
1165-
11661165
if (_PyErr_Occurred(tstate)) {
11671166
if (reason == _Py_GC_REASON_SHUTDOWN) {
11681167
_PyErr_Clear(tstate);

0 commit comments

Comments
 (0)
0