summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-08 20:10:53 (GMT)
committerGitHub <noreply@github.com>2020-04-08 20:10:53 (GMT)
commitcfc3c2f8b34d3864717ab584c5b6c260014ba55a (patch)
treea92ab42422ebb899372b02a0eba52c9c6235bea0 /Python/ceval.c
parentdda5d6e071c6a9d65993d45b90232565cfad2cde (diff)
downloadcpython-cfc3c2f8b34d3864717ab584c5b6c260014ba55a.zip
cpython-cfc3c2f8b34d3864717ab584c5b6c260014ba55a.tar.gz
cpython-cfc3c2f8b34d3864717ab584c5b6c260014ba55a.tar.bz2
bpo-37127: Remove _pending_calls.finishing (GH-19439)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 2e94f32..e219ef3 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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);
@@ -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;
}