8000 gh-99113: A Per-Interpreter GIL! by ericsnowcurrently · Pull Request #104209 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-99113: A Per-Interpreter GIL! #104209

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
runtime->main -> runtime->interpreters.main.
  • Loading branch information
ericsnowcurrently committed Sep 12, 2022
commit dba446005c301df7c5482f53de79a298c09acb71
2 changes: 1 addition & 1 deletion Python/ceval_gil.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ int
_PyEval_ThreadsInitialized(PyInterpreterState *interp)
{
if (interp == NULL) {
interp = &_PyRuntime.main;
interp = _PyRuntime.interpreters.main;
if (interp == NULL) {
return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,8 @@ PyGILState_Ensure(void)

/* Ensure that _PyEval_InitThreads() has been called by Py_Initialize() */
// XXX Use the appropriate interpreter.
assert(runtime->main && _PyEval_ThreadsInitialized(runtime->main));
assert(runtime->interpreters.main &&
_PyEval_ThreadsInitialized(runtime->interpreters.main));
/* Ensure that _PyGILState_Init() has been called by Py_Initialize() */
assert(gilstate->autoInterpreterState);

Expand Down
0