Skip to content

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 18, 2021

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

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>
@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Nov 18, 2021
@pitrou pitrou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 18, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @pitrou for commit 8ca349e 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 18, 2021
@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

20 similar comments
@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

5 similar comments
@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a success ✅ .

@ambv ambv merged commit 5cf05c7 into python:3.10 Nov 18, 2021
@miss-islington miss-islington deleted the backport-df3e53d-3.10 branch November 18, 2021 16:05
@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

2 similar comments
@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a pending ❌ .

@miss-islington
Copy link
Contributor Author

@colesbury and @pitrou: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants