diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-11-18 16:16:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 16:16:06 (GMT) |
commit | 9450c751cc2053b1c2e03ec92ed822a41223b142 (patch) | |
tree | c8441acf90e75f855c8f40c2b712b1a5aa3fd5a7 /Tools/ssl | |
parent | 71d842b9c1e9d86ede449783e630b7a768b579d6 (diff) | |
download | cpython-9450c751cc2053b1c2e03ec92ed822a41223b142.zip cpython-9450c751cc2053b1c2e03ec92ed822a41223b142.tar.gz cpython-9450c751cc2053b1c2e03ec92ed822a41223b142.tar.bz2 |
bpo-45835: Fix race condition in test_queue (GH-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.
(cherry picked from commit df3e53d86b2ad67da9ac2b5a3f56257d1f394982)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Tools/ssl')
0 files changed, 0 insertions, 0 deletions