mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-97922: Run the GC only on eval breaker (#97920)
This commit is contained in:
parent
c66dbddfba
commit
83eb827247
8 changed files with 74 additions and 14 deletions
|
@ -202,6 +202,8 @@ extern void _PyList_ClearFreeList(PyInterpreterState *interp);
|
|||
extern void _PyDict_ClearFreeList(PyInterpreterState *interp);
|
||||
extern void _PyAsyncGen_ClearFreeLists(PyInterpreterState *interp);
|
||||
extern void _PyContext_ClearFreeList(PyInterpreterState *interp);
|
||||
extern void _Py_ScheduleGC(PyInterpreterState *interp);
|
||||
extern void _Py_RunGC(PyThreadState *tstate);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@ struct _ceval_state {
|
|||
_Py_atomic_int eval_breaker;
|
||||
/* Request for dropping the GIL */
|
||||
_Py_atomic_int gil_drop_request;
|
||||
/* The GC is ready to be executed */
|
||||
_Py_atomic_int gc_scheduled;
|
||||
struct _pending_calls pending;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue