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

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion 1 Include/internal/pycore_pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ extern "C" {
/* ceval state */

struct _pending_calls {
int finishing;
PyThread_type_lock lock;
/* Request for running pending calls. */
_Py_atomic_int calls_to_do;
Expand Down
16 changes: 0 additions & 16 deletions 16 Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,18 +547,6 @@ _PyEval_AddPendingCall(PyThreadState *tstate,
assert(pending->lock != NULL);

PyThread_acquire_lock(pending->lock, WAIT_LOCK);
if (pending->finishing) {
PyThread_release_lock(pending->lock);

PyObject *exc, *val, *tb;
_PyErr_Fetch(tstate, &exc, &val, &tb);
_PyErr_SetString(tstate, PyExc_SystemError,
"Py_AddPendingCall: cannot add pending calls "
"(Python shutting down)");
_PyErr_Print(tstate);
_PyErr_Restore(tstate, exc, val, tb);
return -1;
}
int result = _push_pending_call(pending, func, arg);
PyThread_release_lock(pending->lock);

Expand Down Expand Up @@ -666,10 +654,6 @@ _Py_FinishPendingCalls(PyThreadState *tstate)

struct _pending_calls *pending = &tstate->interp->ceval.pending;

PyThread_acquire_lock(pending->lock, WAIT_LOCK);
pending->finishing = 1;
PyThread_release_lock(pending->lock);

if (!_Py_atomic_load_relaxed(&(pending->calls_to_do))) {
return;
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.