Skip to content

Give each thread of the threading checker its own index - #1921

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
each-thread-takes-its-own-index
Oct 17, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
each-thread-takes-its-own-index

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

ThreadingChecker started each task with Task.Run(() => … action(i)), reading the loop's variable. By the time a task ran, i had usually reached the thread count, so every thread got the same index. The two SettingParallelSolve tests, 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) = 0 is { 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.

  • Each task now captures its own index.
  • With Newton the roots are expected to be numbers (a non-empty FiniteSet). Without Newton they are expected not to be.

The Multithreading tests pass twice in a row (99 of 99).

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

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
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 17, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit c074a4c into master Oct 17, 2026
27 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant