From: Sam Gross Date: Wed, 5 Jun 2024 13:23:29 +0000 (-0400) Subject: gh-120065: Increase `collect_in_thread` period to 5 ms. (#120068) X-Git-Tag: v3.14.0a1~1591 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bba1c9e6cfeaf69302b501a4306668613db4b28;p=thirdparty%2FPython%2Fcpython.git gh-120065: Increase `collect_in_thread` period to 5 ms. (#120068) This matches the default GIL switch interval. It greatly speeds up the free-threaded build: previously, it spent nearly all its time in `gc.collect()`. --- diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index 16da24d7805b..ef2fe92cc219 100644 --- a/Lib/test/test_weakref.py +++ b/Lib/test/test_weakref.py @@ -82,7 +82,7 @@ class TestBase(unittest.TestCase): @contextlib.contextmanager -def collect_in_thread(period=0.0001): +def collect_in_thread(period=0.005): """ Ensure GC collections happen in a different thread, at a high frequency. """