mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-111968: Use per-thread freelists for dict in free-threading (gh-114323)
This commit is contained in:
parent
587d480203
commit
13907968d7
13 changed files with 75 additions and 75 deletions
|
@ -1461,9 +1461,12 @@ clear_datastack(PyThreadState *tstate)
|
|||
void
|
||||
_Py_ClearFreeLists(_PyFreeListState *state, int is_finalization)
|
||||
{
|
||||
// In the free-threaded build, freelists are per-PyThreadState and cleared in PyThreadState_Clear()
|
||||
// In the default build, freelists are per-interpreter and cleared in finalize_interp_types()
|
||||
_PyFloat_ClearFreeList(state, is_finalization);
|
||||
_PyTuple_ClearFreeList(state, is_finalization);
|
||||
_PyList_ClearFreeList(state, is_finalization);
|
||||
_PyDict_ClearFreeList(state, is_finalization);
|
||||
_PyContext_ClearFreeList(state, is_finalization);
|
||||
_PyAsyncGen_ClearFreeLists(state, is_finalization);
|
||||
_PyObjectStackChunk_ClearFreeList(state, is_finalization);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue