Skip to content

Commit

Permalink
Revert "pythongh-115103: Update refleak checker to trigger _PyMem_Pro…
Browse files Browse the repository at this point in the history
…cessDelayed (pythongh-116238)"

This reverts commit 2e91578.
  • Loading branch information
corona10 committed Mar 2, 2024
1 parent 2e91578 commit 0f19393
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions Python/gc_free_threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,23 +324,6 @@ merge_all_queued_objects(PyInterpreterState *interp, struct collection_state *st
HEAD_UNLOCK(&_PyRuntime);
}

static void
process_delayed_frees(PyInterpreterState *interp)
{
// In STW status, we can observe the latest write sequence by
// advancing the write sequence immediately.
_Py_qsbr_advance(&interp->qsbr);
_PyThreadStateImpl *current_tstate = (_PyThreadStateImpl *)_PyThreadState_GET();
_Py_qsbr_quiescent_state(current_tstate->qsbr);
HEAD_LOCK(&_PyRuntime);
PyThreadState *tstate = interp->threads.head;
while (tstate != NULL) {
_PyMem_ProcessDelayed(tstate);
tstate = (PyThreadState *)tstate->next;
}
HEAD_UNLOCK(&_PyRuntime);
}

// Subtract an incoming reference from the computed "gc_refs" refcount.
static int
visit_decref(PyObject *op, void *arg)
Expand Down Expand Up @@ -1023,7 +1006,6 @@ gc_collect_internal(PyInterpreterState *interp, struct collection_state *state)
_PyEval_StopTheWorld(interp);
// merge refcounts for all queued objects
merge_all_queued_objects(interp, state);
process_delayed_frees(interp);

// Find unreachable objects
int err = deduce_unreachable_heap(interp, state);
Expand Down

0 comments on commit 0f19393

Please sign in to comment.