Skip to content

Commit f9ffca3

Browse files
gh-151177: Fix race condition in _testembed (GH-151293)
1 parent 9620f69 commit f9ffca3

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
@@ -2715,8 +2715,8 @@ do_tstate_ensure(void *arg)
27152715
PyThreadState_Release(tokens[2]);
27162716
PyThreadState_Release(tokens[1]);
27172717
PyThreadState_Release(tokens[0]);
2718-
PyInterpreterGuard_Close(guard);
27192718
_Py_atomic_store_int(&data->done, 1);
2719+
PyInterpreterGuard_Close(guard);
27202720
}
27212721

27222722
static int

0 commit comments

Comments
 (0)