-
-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Barrier hangs indefinitely when arg parties < 0 or invalid type
#121474
Comments
parties < 0parties < 0 or invalid type
|
asyncio.Barrier has this validation https://github.com/python/cpython/blob/3.12/Lib/asyncio/locks.py#L457 |
This issue is not related to https://github.com/python/cpython/blob/3.12/Lib/threading.py#L670 |
I'm aware. My point is that asyncio.Barrier has this validation so threading.Barrier should have it also |
…honGH-121480) (cherry picked from commit d27a53f) Co-authored-by: Clinton <pygeek@users.noreply.github.com>
…honGH-121480) (cherry picked from commit d27a53f) Co-authored-by: Clinton <pygeek@users.noreply.github.com>
Bug report
Bug description:
threading.Barrierat no point checks for validparties.parties, of a negative value, or invalid type hang indefinitely on.wait(). This behavior is inconsistent from the behavior of any otherthreadingprimitives, which either conduct sanity checks on args during initialization, or fail at some point in their execution.Steps to reproduce:
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: