Bun has an open PR adding shared-memory threads to JavaScriptCore

github.com
June 20, 2026
293 min read
54/100
Summary
Shared-memory threads for JavaScriptCore allow functions to run on separate threads while sharing the same heap and objects, eliminating the need for structured cloning or message passing. This experimental feature is currently not functional.
Key Takeaways
- Shared-memory threads for JavaScriptCore allow functions to run on another thread without message passing or cloning, sharing the same heap and objects directly.
- The new threading model enables parallel execution without a global lock, passing all thread test suites, but is still in an experimental phase with additional cleanup and testing required.
- The API allows for easy thread creation and management, enabling closures to access shared variables directly, improving performance and simplifying code compared to traditional worker models.
- A shared cache can be implemented using a single Map, allowing for efficient memoization across threads without the need for separate caches or complex inter-thread communication.
Coverage & discussions
Hacker News · github.com
Community discussions
Community Sentiment
Positives
- The potential for true parallelism in JavaScript engines could revolutionize performance, making applications more efficient and responsive.
- The excitement around implementing shared-global multithreading indicates a significant advancement in JavaScript capabilities, which could lead to more powerful web applications.
Concerns
- Concerns about the trustworthiness of the codebase and the oversight of a single individual raise significant doubts about the project's stability and reliability.
- The perception that AI tools are not effective at multi-threading code highlights a critical limitation in current AI capabilities, which could hinder development efforts.
- The PR's description is criticized for being filled with LLMisms, suggesting a lack of clarity and readability that could impede understanding and adoption.
Related Articles
![[compiler] Port React Compiler to Rust by josephsavona · Pull Request #36173 · react/react](https://pub-90f0ac00d93c47daac3e1d2cdd28d496.r2.dev/articles/557e35ec428d654683add60e23ae7aae.webp)
Port React Compiler to Rust
Jun 10, 2026

I hate compilers
Jun 18, 2026

How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Faster
Jul 26, 2026

Project Valhalla, Explained: How a Decade of Work Arrives in JDK 28
Jun 19, 2026

We rewrote our Rust WASM Parser in TypeScript – and it got 3x Faster
Mar 20, 2026