Repository navigation
Give each thread of the threading checker its own index - #1921
Merged
Merged
Conversation
The tasks read the loop's variable, which had usually reached the thread count by the time they ran, so every thread was given the same index and the solving tests never ran with Newton off. When a task did start early it ran without Newton, and the test expected an empty set where the answer is the conditional set the equation defines; it failed once in a loaded full suite. Without Newton the roots are now expected not to be numbers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
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.
ThreadingCheckerstarted each task withTask.Run(() => … action(i)), reading the loop's variable. By the time a task ran,ihad usually reached the thread count, so every thread got the same index. The twoSettingParallelSolvetests, which turn Newton off on odd threads, therefore almost never ran without Newton.Under load a task sometimes starts early, gets an odd index, and runs without Newton. The test then expected an empty set, but without Newton the answer to
x2 + e^x + sin(x) = 0is{ x : sin(x) + e^x + x^2 = 0 }, the conditional set the equation defines. That failed once in a full local suite on master (OSettingParallelSolve: Expected False, Actual True) and passed when run alone.FiniteSet). Without Newton they are expected not to be.The
Multithreadingtests pass twice in a row (99 of 99).🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura