summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-11-18 16:05:40 (GMT)
committerGitHub <noreply@github.com>2021-11-18 16:05:40 (GMT)
commit5cf05c71d13a4b4a94cc77da4214ee2f0b9c7de7 (patch)
treebceeed0205a7c58364dc3bb3f3a332d8f998c8e9 /Misc/NEWS.d
parent65c089751b81a132613f4528f16938918a013f25 (diff)
downloadcpython-5cf05c71d13a4b4a94cc77da4214ee2f0b9c7de7.zip
cpython-5cf05c71d13a4b4a94cc77da4214ee2f0b9c7de7.tar.gz
cpython-5cf05c71d13a4b4a94cc77da4214ee2f0b9c7de7.tar.bz2
bpo-45835: Fix race condition in test_queue (GH-29601) (GH-29612)
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 df3e53d86b2ad67da9ac2b5a3f56257d1f394982) Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/Tests/2021-11-17-14-28-08.bpo-45835.Mgyhjx.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Tests/2021-11-17-14-28-08.bpo-45835.Mgyhjx.rst b/Misc/NEWS.d/next/Tests/2021-11-17-14-28-08.bpo-45835.Mgyhjx.rst
new file mode 100644
index 0000000..6a73b01
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2021-11-17-14-28-08.bpo-45835.Mgyhjx.rst
@@ -0,0 +1 @@
+Fix race condition in test_queue tests with multiple "feeder" threads.