feat: expose max_threads on batch solve/calc-table Python bindings#207
Open
zzcgumn wants to merge 1 commit into
Open
feat: expose max_threads on batch solve/calc-table Python bindings#207zzcgumn wants to merge 1 commit into
zzcgumn wants to merge 1 commit into
Conversation
Add an optional max_threads argument (default 0 = auto) to solve_all_boards_pbn, solve_all_boards_bin, and calc_all_tables_pbn, routing them through the threaded C wrappers SolveAllBoardsN, SolveAllBoardsBinN, and CalcAllTablesPBNN respectively. These delegate to the internal solve_all_boards_pbn_n / solve_all_boards_n / calc_all_boards_n helpers, giving Python callers control over the worker-thread cap for batch operations. <=0 preserves the existing hardware_concurrency default, so the change is backward compatible. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
max_threadsargument (default0= auto) to thesolve_all_boards_pbn,solve_all_boards_bin, andcalc_all_tables_pbnPython bindings, giving callers control over the worker-thread cap for batch operations.SolveAllBoardsN,SolveAllBoardsBinN, andCalcAllTablesPBNN, which delegate to the internalsolve_all_boards_pbn_n/solve_all_boards_n/calc_all_boards_nhelpers.max_threads <= 0preserves the existinghardware_concurrency()default, so the change is fully backward compatible.Test plan
bazel build //python:_dds3compiles cleanlybazel test //python:solve_all_boards_test //python:calc_tables_testpass (default behavior unchanged)max_threads=1/2/4is accepted and returns results identical to the default for both solve and calc-table paths🤖 Generated with Claude Code
Closes #206