Skip to content

fix: harden free-threaded execution state - #104

Merged
Qubitium merged 5 commits into
mainfrom
polly/gil0-fixes
Aug 22, 2026
Merged

fix: harden free-threaded execution state#104
Qubitium merged 5 commits into
mainfrom
polly/gil0-fixes

Conversation

@Qubitium

Copy link
Copy Markdown
Contributor

Summary

  • Serialize parallel_map executor acquisition/submission against concurrent pool replacement.
  • Synchronize Python shared configuration and Pattern thread-mode state for free-threaded Python.
  • Snapshot groupindex iteration and initialize native replacement tokens defensively.
  • Add deterministic pool-race, GIL=0, and malformed replacement-token regression tests.

Verification

  • Interpreter: /Users/diego/.local/share/uv/python/cpython-3.14.0rc2+freethreaded-macos-aarch64-none/bin/python3.14t (sys._is_gil_enabled() == False)
  • python -m pytest --durations=0 tests: 834 passed, 15 skipped (849 collected)
  • python -m pytest --collect-only -q tests: 849 tests collected
  • Clang analyzer: four pre-existing dead-store warnings elsewhere in pcre2.c; no warning on changed code.
  • PYTHONMALLOC=debug focused execution passed. macOS leaks reported 0 leaks but was restricted from full process inspection.

Does not merge the PR.

Qubitium and others added 5 commits August 22, 2026 11:22
Serialize shared executor submission against replacement and synchronize Python-layer configuration snapshots and pattern thread modes. Harden native group-index/replacement handling and add deterministic GIL=0 regression coverage.

Co-authored-by: omnigent <noreply@omnigent.ai>
Remove avoidable read-side locks from compile and thread configuration paths while preserving coherent writer publication and executor submission leases.

Co-authored-by: omnigent <noreply@omnigent.ai>
Document the controlled Apple arm64 A/B matrix, reduced lock overhead, and the limits of taskpolicy scheduling measurements.

Co-authored-by: omnigent <noreply@omnigent.ai>
Update the preserved comparison tables with complete Apple arm64 medians for stdlib.re and regex workloads.

Co-authored-by: omnigent <noreply@omnigent.ai>
Preserve the full scheduler-policy fanout and call-local benchmark comparison for both interpreters.

Co-authored-by: omnigent <noreply@omnigent.ai>
@Qubitium
Qubitium merged commit 789ef4e into main Aug 22, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant