https://github.com/python/cpython/commit/f561258efd944a1d6a0857ef1a0f171da989ed58
commit: f561258efd944a1d6a0857ef1a0f171da989ed58
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: colesbury <[email protected]>
date: 2024-06-05T13:46:17Z
summary:

[3.13] gh-120065: Increase `collect_in_thread` period to 5 ms. (GH-120068) 
(#120110)

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()`.
(cherry picked from commit 4bba1c9e6cfeaf69302b501a4306668613db4b28)

Co-authored-by: Sam Gross <[email protected]>

files:
M Lib/test/test_weakref.py

diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index 16da24d7805b56..ef2fe92cc219b6 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -82,7 +82,7 @@ def callback(self, ref):
 
 
 @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.
     """

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to