diff options
author | Yan Yanchii <46005801+WolframAlph@users.noreply.github.com> | 2023-12-11 23:23:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-11 23:23:41 (GMT) |
commit | fed294c6453527addd1644633849e2d8492058c5 (patch) | |
tree | 7d940a612c4b0dc572dc8a83b2542aef524529ed /Python | |
parent | 1c5fc02fd0576be125638a5261be12eb3224be81 (diff) | |
download | cpython-fed294c6453527addd1644633849e2d8492058c5.zip cpython-fed294c6453527addd1644633849e2d8492058c5.tar.gz cpython-fed294c6453527addd1644633849e2d8492058c5.tar.bz2 |
gh-112978: Remove redundant condition inside `take_gil` (gh-112979)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval_gil.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Python/ceval_gil.c b/Python/ceval_gil.c index 636e4db..7581daa 100644 --- a/Python/ceval_gil.c +++ b/Python/ceval_gil.c @@ -307,10 +307,6 @@ take_gil(PyThreadState *tstate) MUTEX_LOCK(gil->mutex); - if (!_Py_atomic_load_int_relaxed(&gil->locked)) { - goto _ready; - } - int drop_requested = 0; while (_Py_atomic_load_int_relaxed(&gil->locked)) { unsigned long saved_switchnum = gil->switch_number; @@ -345,7 +341,6 @@ take_gil(PyThreadState *tstate) } } -_ready: #ifdef FORCE_SWITCHING /* This mutex must be taken before modifying gil->last_holder: see drop_gil(). */ |