summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2021-11-18 08:51:30 (GMT)
committerGitHub <noreply@github.com>2021-11-18 08:51:30 (GMT)
commitdf3e53d86b2ad67da9ac2b5a3f56257d1f394982 (patch)
tree9e3c4fa3de064a5b8829c6f6b7677767d6736224 /Modules
parent25ecc040d007a55e4b5c30fa739054b52c1aacac (diff)
downloadcpython-df3e53d86b2ad67da9ac2b5a3f56257d1f394982.zip
cpython-df3e53d86b2ad67da9ac2b5a3f56257d1f394982.tar.gz
cpython-df3e53d86b2ad67da9ac2b5a3f56257d1f394982.tar.bz2
bpo-45835: Fix race condition in test_queue (#29601)
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.
Diffstat (limited to 'Modules')
0 files changed, 0 insertions, 0 deletions