Skip to content

Commit 491768d

Browse files
[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 f9ffca3) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
1 parent e3b94d8 commit 491768d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Programs/_testembed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2710,8 +2710,8 @@ do_tstate_ensure(void *arg)
27102710
PyThreadState_Release(tokens[2]);
27112711
PyThreadState_Release(tokens[1]);
27122712
PyThreadState_Release(tokens[0]);
2713-
PyInterpreterGuard_Close(guard);
27142713
_Py_atomic_store_int(&data->done, 1);
2714+
PyInterpreterGuard_Close(guard);
27152715
}
27162716

27172717
static int

0 commit comments

Comments
 (0)