aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_functools.py
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-04-29 14:36:02 -0400
committerGitHub <noreply@github.com>2024-04-29 14:36:02 -0400
commit7ccacb220d99662b626c8bc63b00a27eaf604f0c (patch)
tree231cb901ee62e523be237392b0f2b966aa8be128 /Lib/test/test_functools.py
parent8d4b756fd31d4d91b55105b1241561e92cc571a3 (diff)
downloadcpython-7ccacb220d99662b626c8bc63b00a27eaf604f0c.tar.gz
cpython-7ccacb220d99662b626c8bc63b00a27eaf604f0c.zip
gh-117783: Immortalize objects that use deferred reference counting (#118112)
Deferred reference counting is not fully implemented yet. As a temporary measure, we immortalize objects that would use deferred reference counting to avoid multi-threaded scaling bottlenecks. This is only performed in the free-threaded build once the first non-main thread is started. Additionally, some tests, including refleak tests, suppress this behavior.
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r--Lib/test/test_functools.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index ec5f6af5e17..bb4c7cc8701 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -1833,6 +1833,7 @@ class TestLRU:
return 1
self.assertEqual(f.cache_parameters(), {'maxsize': 1000, "typed": True})
+ @support.suppress_immortalization()
def test_lru_cache_weakrefable(self):
@self.module.lru_cache
def test_function(x):