Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
cpython
Commits
2f0a8ee3
Commit
2f0a8ee3
authored
10 years ago
by
Benjamin Peterson
Browse files
Options
Download
Email Patches
Plain Diff
check if the thread is finalizing after retaking the GIL
parent
d58f9abe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Python/ceval.c
Python/ceval.c
+7
-0
No files found.
Python/ceval.c
View file @
2f0a8ee3
...
...
@@ -1024,6 +1024,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
/* Other threads may run now */
PyThread_acquire_lock
(
interpreter_lock
,
1
);
/* Check if we should make a quick exit. */
if
(
_Py_Finalizing
&&
_Py_Finalizing
!=
tstate
)
{
PyThread_release_lock
(
interpreter_lock
);
PyThread_exit_thread
();
}
if
(
PyThreadState_Swap
(
tstate
)
!=
NULL
)
Py_FatalError
(
"ceval: orphan tstate"
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment