Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17548dd

Browse files
committed
check if the thread is finalizing after retaking the GIL
1 parent6637565 commit17548dd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎Python/ceval.c‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
12671267
/* Other threads may run now */
12681268

12691269
take_gil(tstate);
1270+
1271+
/* Check if we should make a quick exit. */
1272+
if (_Py_Finalizing&&_Py_Finalizing!=tstate) {
1273+
drop_gil(tstate);
1274+
PyThread_exit_thread();
1275+
}
1276+
12701277
if (PyThreadState_Swap(tstate)!=NULL)
12711278
Py_FatalError("ceval: orphan tstate");
12721279
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp