Skip to content

feat: close core threads runtime delivery gaps - #959

Merged
fglock merged 8 commits into
masterfrom
feature/perl-threads-release-closure
Aug 15, 2026
Merged

feat: close core threads runtime delivery gaps#959
fglock merged 8 commits into
masterfrom
feature/perl-threads-release-closure

Conversation

@fglock

@fglock fglock commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • make Java 24 virtual threads the default carrier while retaining explicit platform mode and platform fallback for nonzero stack requests
  • add bounded, default-off runtime pooling and opt-in concurrent Netty PSGI request runtimes
  • implement fresh nested threads::shared aggregate proxy views with local reblessing, store-back publication, weak views, and cyclic backing
  • add a child-owned DBI/SQLite threads example and record measured release evidence and remaining blockers

Validation

  • make — PASS
  • make check-links — PASS, 0 errors
  • nested shared proxy oracle — system Perl, JVM, interpreter: 10/10 each
  • default Test2 thread matrix — 13 files, 38/38
  • core anchors — threads.t 30/30, index_thr.t 415/415, substr_thr.t 400/400, stclass_threads.t 6/6, user_prop_race_thr.t 3/3, pat_psycho_thr.t 17/17
  • Storable threads — 2/2
  • Net::SSLeay thread callback/context gates — 1/1 each
  • DBI example — identical success under system Perl, JVM, and interpreter
  • timeout 3600 ./jcpan --jobs 8 -t DBIx::Class — PASS, 325 files / 42,671 assertions

Known follow-up

  • Phase 36 direct regex engine gaps remain; thread wrappers inherit those direct limitations.
  • Two opt-in Test2 stress assertions remain blocked by premature AsyncSubtest destruction between run and explicit detach; default Test2 thread coverage is green.
  • Phase 39b cross-runtime final-owner destruction and the explicit compatibility transition for destructive plain share remain open.
  • The broad bundled-module task has an existing wider project baseline of 152 unrelated Text::CSV/YAML/etc. failures; the bundled thread-specific Storable and Net::SSLeay gates pass.

Generated with Codex

fglock and others added 8 commits August 15, 2026 08:51
Select Java 24 virtual threads by default from the Unix and Windows
launchers while retaining explicit platform mode. Route nonzero Perl stack
requests to a platform-backed child so the requested option is not silently
discarded.

Update the public documentation and concurrency plan, and cover the carrier
fallback without changing the existing direct virtual-policy rejection
contract.

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

Co-Authored-By: Codex <codex@openai.com>
Add exclusive runtime leases with reset-or-replace recycling, default-off
configuration, active-lease shutdown safety, and concurrent churn coverage.
Netty can prebuild independent application snapshots, check one out for each
request, and advertise psgi.multithread only while that isolation is active.

Document the lifecycle contract, retention result, and measured concurrent
request benefit while avoiding a general microbenchmark speedup claim.

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

Co-Authored-By: Codex <codex@openai.com>
Give references fetched from shared arrays and hashes fresh runtime-local
wrappers over their canonical backing. Preserve local reblessing until a view
is stored back, and keep weak and cyclic proxy behavior aligned with Perl.

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

Co-Authored-By: Codex <codex@openai.com>
Add a deterministic SQLite example that creates each DBI connection in its
own ithread and returns ordinary aggregate data through join. Record the
captured release-matrix evidence and remaining Test2 and regex blockers.

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

Co-Authored-By: Codex <codex@openai.com>
Validate constant-composed qr literals while preserving lazy expected-error
boundaries, implement FAIL/F regex verbs, and keep diagnostics in the creating
runtime for thread entry code.

Coordinate canonical shared aggregate destruction with runtime-local fetched
views so the final releasing runtime invokes DESTROY exactly once. Update the
threads plan with the completed tranche and remaining architectural blockers.

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

Co-Authored-By: Codex <codex@openai.com>
Preserve closure capture ownership and active CODE roots across ithread
snapshots, restore cloned self references and lexical SUPER dispatch, and
keep weak assignment destinations independent from their source aliases.

Add focused system-Perl-compatible lifetime, SUPER-chain, and weak-assignment
oracles. Record the completed Test2, native callback, DBIx::Class, unit-build,
and documentation release gates while retaining the explicit Phase 36 and
Phase 39b compatibility work.

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

Co-Authored-By: Codex <codex@openai.com>
Move the regex-parity project into a dedicated staged design document with
direct and threaded gates, callback architecture, CPAN targets, coordination
boundaries, and resumable progress tracking. Keep the concurrency plan focused
on cross-project integration and Phase 44 preservation.

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

Co-Authored-By: Codex <codex@openai.com>
Keep terminal thread aliases and their observable metadata without retaining
the completed child interpreter, entry-point closure, and result graph. Release
detached children at completion and joined children after their values have
been cloned back to the parent runtime.

This prevents repeated thread wrappers from exhausting the heap while
preserving join, detach, error, and alias semantics.

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

Co-Authored-By: OpenAI Codex <codex@openai.com>
@fglock
fglock merged commit a06093b into master Aug 15, 2026
2 checks passed
@fglock
fglock deleted the feature/perl-threads-release-closure branch August 15, 2026 13:29
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