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
Pass PyInterpreterState to _PyEval_FiniState().
  • Loading branch information
ericsnowcurrently committed Sep 12, 2022
commit 57ca2fa9c974739920d9c65b1878d1089d1f6e97
2 changes: 1 addition & 1 deletion Include/internal/pycore_ceval.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct _ceval_runtime_state;
extern void _Py_FinishPendingCalls(PyThreadState *tstate);
extern void _PyEval_InitRuntimeState(_PyRuntimeState *);
extern void _PyEval_InitState(PyInterpreterState *, PyThread_type_lock);
extern void _PyEval_FiniState(struct _ceval_state *ceval);
extern void _PyEval_FiniState(PyInterpreterState *);
PyAPI_FUNC(void) _PyEval_SignalReceived(PyInterpreterState *interp);
PyAPI_FUNC(int) _PyEval_AddPendingCall(
PyInterpreterState *interp,
Expand Down
4 changes: 2 additions & 2 deletions Python/ceval_gil.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,9 +930,9 @@ _PyEval_InitState(PyInterpreterState *interp, PyThread_type_lock pending_lock)
}

void
_PyEval_FiniState(struct _ceval_state *ceval)
_PyEval_FiniState(PyInterpreterState *interp)
{
struct _pending_calls *pending = &ceval->pending;
struct _pending_calls *pending = &interp->ceval.pending;
if (pending->lock != NULL) {
PyThread_free_lock(pending->lock);
pending->lock = NULL;
Expand Down
2 changes: 1 addition & 1 deletion Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ PyInterpreterState_Delete(PyInterpreterState *interp)
struct pyinterpreters *interpreters = &runtime->interpreters;
zapthreads(interp, 0);

_PyEval_FiniState(&interp->ceval);
_PyEval_FiniState(interp);

/* Delete current thread. After this, many C API calls become crashy. */
_PyThreadState_Swap(&runtime->gilstate, NULL);
Expand Down
0