Skip to content

Commit f561258

Browse files
[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 4bba1c9) Co-authored-by: Sam Gross <[email protected]>
1 parent 8e0c80a commit f561258

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_weakref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def callback(self, ref):
8282

8383

8484
@contextlib.contextmanager
85-
def collect_in_thread(period=0.0001):
85+
def collect_in_thread(period=0.005):
8686
"""
8787
Ensure GC collections happen in a different thread, at a high frequency.
8888
"""

0 commit comments

Comments
 (0)