-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
[3.10] bpo-45835: Fix race condition in test_queue (GH-29601) #29612
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
Conversation
Some of the tests in test_queue had a race condition in which a non-sentinel value could be enqueued after the final sentinel value leading to not all the inputs being processed (and test failures). This changes feed() to enqueue a sentinel once the inputs are exhausted, which guarantees that the final queued object is a sentinel. This requires the number of feeder threads to match the number of consumer threads, but that's already the case in the relevant tests. (cherry picked from commit df3e53d) Co-authored-by: Sam Gross <[email protected]>
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
20 similar comments
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
5 similar comments
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a success ✅ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a success ✅ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
2 similar comments
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a success ✅ . |
@colesbury and @pitrou: Status check is done, and it's a pending ❌ . |
@colesbury and @pitrou: Status check is done, and it's a success ✅ . |
Some of the tests in test_queue had a race condition in which a
non-sentinel value could be enqueued after the final sentinel value
leading to not all the inputs being processed (and test failures).
This changes feed() to enqueue a sentinel once the inputs are exhausted,
which guarantees that the final queued object is a sentinel. This
requires the number of feeder threads to match the number of consumer
threads, but that's already the case in the relevant tests.
(cherry picked from commit df3e53d)
Co-authored-by: Sam Gross [email protected]
https://bugs.python.org/issue45835