Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.3k
gh-128639: Don't assume one thread in subinterpreter finalization#128640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
025cc17
eea3ba9
149e0cf
1761c37
8febfbf
5a73ce1
a7cc3fe
7c44c0b
6551bfa
f19e28d
02da72a
a759540
76e4ec9
1555731
d61099e
09851dc
b223396
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1991,7 +1991,6 @@ resolve_final_tstate(_PyRuntimeState *runtime) | ||
/* We might want to warn if main_tstate->current_frame != NULL. */ | ||
return main_tstate; | ||
} | ||
@@ -2007,8 +2006,6 @@ _Py_Finalize(_PyRuntimeState *runtime) | ||
/* Get final thread state pointer. */ | ||
PyThreadState *tstate = resolve_final_tstate(runtime); | ||
// Block some operations. | ||
tstate->interp->finalizing = 1; | ||
@@ -2513,8 +2510,7 @@ finalize_subinterpreters(void) | ||
while (interp != NULL) { | ||
/* Make a tstate for finalization. */ | ||
PyThreadState *tstate = _PyThreadState_NewBound(interp, _PyThreadState_WHENCE_FINI); | ||
ericsnowcurrently marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
if (tstate == NULL) { | ||
// XXX Some graceful way to always get a thread state? | ||
Py_FatalError("thread state allocation failed"); | ||
ZeroIntensity marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
} | ||
Uh oh!
There was an error while loading.Please reload this page.