mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
[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 4bba1c9e6c
)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
8e0c80a486
commit
f561258efd
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue