-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Issues when Condition.notify() is interrupted #92530
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
Comments
…ng.Condition.notify
In #90882 the discussion led to a solution of adding threading.Thread.acquire_and_release method which would solve #89437, but I don't think a PR for that was ever created. This solution probably doesn't help here. Simply ignoring the RuntimeError here would mean that in those cases notify(n) would wake up fewer than n threads even if n threads were available to wake. Possibly that's not an issue since condition vars don't make guarantees about how many threads will be awoken. |
…dition.notify (GH-92534) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock.
…ng.Condition.notify (pythonGH-92534) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <[email protected]>
…ng.Condition.notify (pythonGH-92534) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <[email protected]>
…ng.Condition.notify (pythonGH-92534) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <[email protected]>
…dition.notify (GH-92534) (GH-92831) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <[email protected]>
…dition.notify (GH-92534) (GH-92830) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <[email protected]>
…ing.Condition.notify (GH-92534) (GH-92829) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <[email protected]> Automerge-Triggered-By: GH:serhiy-storchaka
…ng.Condition.notify (pythonGH-92534) (pythonGH-92831) If Condition.notify() was interrupted just after it released the waiter lock, but before removing it from the queue, the following calls of notify() failed with RuntimeError: cannot release un-acquired lock. (cherry picked from commit 70af994) Co-authored-by: Serhiy Storchaka <[email protected]>
If
threading.Condition.notify()
is interrupted just after it releases the waiter lock, but before remove it from the queue, the following calls ofnotify()
will fail withRuntimeError: cannot release un-acquired lock
. It can block the waiter threads if they do not use timeout.cpython/Lib/threading.py
Lines 375 to 380 in 5bc2390
The simplest solution would be to silence a RuntimeError in
waiter.release()
. There may be similar issues in other parts of the code.The text was updated successfully, but these errors were encountered: