[3.10] bpo-45835: Fix race condition in test_queue (GH-29601)#29612
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 <colesbury@gmail.com>
|
@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 colesbury@gmail.com
https://bugs.python.org/issue45835