From 491768da4c7ffcc38809724d4d9c4a67e7131b9d Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Thu, 11 Jun 2026 12:10:55 +0200 Subject: [PATCH] [3.15] gh-151177: Fix race condition in `_testembed` (GH-151293) (GH-151312) gh-151177: Fix race condition in `_testembed` (GH-151293) (cherry picked from commit f9ffca39351b77197e4dc2775a0d1e4ad64bf0e5) Co-authored-by: Peter Bierma --- Programs/_testembed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Programs/_testembed.c b/Programs/_testembed.c index 278984ddb17c..fa223c24b2e7 100644 --- a/Programs/_testembed.c +++ b/Programs/_testembed.c @@ -2710,8 +2710,8 @@ do_tstate_ensure(void *arg) PyThreadState_Release(tokens[2]); PyThreadState_Release(tokens[1]); PyThreadState_Release(tokens[0]); - PyInterpreterGuard_Close(guard); _Py_atomic_store_int(&data->done, 1); + PyInterpreterGuard_Close(guard); } static int -- 2.47.3