From https://github.com/python/cpython/issues/111968, we now manage free lists as per-thread resources.
But the overhead of this implementation is that gc should traverse the resources of all threads that belong to the interpreter.
Since the clearing multiple per thread resources can be split by multiple thread tasks, it will be beneficial to reduce GC time.
From https://github.com/python/cpython/issues/111968, we now manage free lists as per-thread resources. But the overhead of this implementation is that gc should traverse the resources of all threads that belong to the interpreter.
Since the clearing multiple per thread resources can be split by multiple thread tasks, it will be beneficial to reduce GC time.
ref: https://github.com/python/cpython/pull/113584#discussion_r1438822073 source code: https://github.com/python/cpython/blob/dac1da21218a406652b35919aa2118cc32d4c65a/Python/gc_free_threading.c#L21-L27
cc @colesbury