]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112529: Stop the world around gc.get_referents (#114823)
authorSam Gross <colesbury@gmail.com>
Tue, 6 Feb 2024 16:45:42 +0000 (11:45 -0500)
committerGitHub <noreply@github.com>
Tue, 6 Feb 2024 16:45:42 +0000 (11:45 -0500)
commit7fdd4235d790559372bbb1bf0c2384191a9bb5f3
treef97f2018900b70ca3fdf7c0643e20eef6b511803
parentf7a22a7055d97c05406512577bdfcb6d3f134b91
gh-112529: Stop the world around gc.get_referents (#114823)

We do not want to add locking in `tp_traverse` slot implementations.
Instead, stop the world when calling `gc.get_referents`. Note that the the
stop the world call is a no-op in the default build.

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Modules/gcmodule.c