8000 [3.13] gh-120065: Increase `collect_in_thread` period to 5 ms. (GH-120068) by miss-islington · Pull Request #120110 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-120065: Increase collect_in_thread period to 5 ms. (GH-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()`.
(cherry picked from commit 4bba1c9)

Co-authored-by: Sam Gross <colesbury@gmail.com>
  • Loading branch information
colesbury authored and miss-islington committed Jun 5, 2024
commit 721c3e147db273470eccd16c37e124849cfa0795
2 changes: 1 addition & 1 deletion Lib/test/test_weakref.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
0