Skip to content

Serialize Perl compilation for thread safety - #918

Merged
fglock merged 1 commit into
masterfrom
feature/perl-threads-phase-2
Aug 11, 2026
Merged

Serialize Perl compilation for thread safety#918
fglock merged 1 commit into
masterfrom
feature/perl-threads-phase-2

Conversation

@fglock

@fglock fglock commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • add one documented reentrant lock around every known initial and runtime compilation path
  • preserve nested BEGIN/use/require/eval compilation while releasing each entry point's own hold before ordinary execution
  • serialize lazy named-sub materialization, reset, and verifier fallback compilation
  • add deterministic queueing, mixed-backend concurrency, reentrant hold-count, failure-cleanup, nested eval, and unlocked-execution tests
  • mark Phase 2 complete in dev/design/concurrency.md

This is the independent Phase 2 PR in the Perl threads implementation train. It establishes compiler serialization only; runtime state isolation begins in later phases.

Validation

  • make — passed
  • focused system Perl eval suite — 4 files / 12 tests passed
  • eval_context_stack_reentrancy.t — passed on JVM and interpreter backends
  • Scalar::Util 1.70 and Moo 2.005005 load smokes — passed on JVM and interpreter backends
  • make test-all — exited 0; core 83.0%, bundled modules 80.8%

Design

See dev/design/concurrency.md, Phase 2 and Progress Tracking.

Add a reentrant global compilation boundary across initial source and AST
compilation, both eval backends, lazy named-sub materialization, reset, and
runtime verifier fallback. Release each entry point's own hold before ordinary
execution while preserving nested BEGIN/use/require/eval compilation.

Add deterministic concurrency and failure-path coverage, and record Phase 2
completion and validation in the threads design plan.

Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock merged commit a4fddbb into master Aug 11, 2026
2 checks passed
@fglock
fglock deleted the feature/perl-threads-phase-2 branch August 11, 2026 08:05
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