Simplify how parallel workers are fed tests - #141
Draft
bbannier wants to merge 6 commits into
Draft
Conversation
`Test` defines no `__bool__`, so every instance is always truthy.
Workers drain naturally when the queue empties rather than checking an abort flag on every dispatch. The queue is cleared at the point where the failure is recorded, which is where the abort decision logically belongs.
Isolates the alternatives-expansion logic from the dispatch loop so the upcoming generator conversion of `nextTests` stays readable.
Replaces the `None`-sentinel protocol with a generator that yields individual tests. The worker loop simplifies to a plain `for` and the `saveTiming` call moves to after the loop, so the timing file is read and written once per worker rather than once per test. Reruns appended to the queue by `testFailed` are picked up naturally on the next outer `while True` iteration.
Align with the snake_case convention used throughout the newer parts of the codebase.
bbannier
force-pushed
the
topic/bbannier/nextTests-generator
branch
from
July 31, 2026 10:56
7b15246 to
9124494
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were using a pretty elaborate protocol with lists and
Nonesentinel values. This PR simplifies so tests now read from a simple generator which encapsulates all the logic. We also do some adjacent cleanups.