diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2022-10-08 14:57:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 14:57:09 (GMT) |
commit | 83eb827247dd28b13fd816936c74c162e9f52a2d (patch) | |
tree | 40a8abf0018f178eeadd976ad4cba326f9a86029 /Include | |
parent | c66dbddfbaa374a6954897809574ee9fb463e393 (diff) | |
download | cpython-83eb827247dd28b13fd816936c74c162e9f52a2d.zip cpython-83eb827247dd28b13fd816936c74c162e9f52a2d.tar.gz cpython-83eb827247dd28b13fd816936c74c162e9f52a2d.tar.bz2 |
gh-97922: Run the GC only on eval breaker (#97920)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_gc.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_interp.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Include/internal/pycore_gc.h b/Include/internal/pycore_gc.h index bfab0ad..b3abe20 100644 --- a/Include/internal/pycore_gc.h +++ b/Include/internal/pycore_gc.h @@ -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 } diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index 8cecd5a..c11e897 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -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; }; |