Scoopfeeds — Intelligent news, curated.
computer-science

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

Hacker News · Jun 20, 2026, 5:02 PM

Key takeaways

  • There was an error while loading.
  • Status: parallel JavaScript executes, through all four JIT tiers, with no global lock — and the thread test suite now passes that way.
  • A thread is a function call on another core:

There was an error while loading. Please reload this page.

Copy link Copy Markdown Collaborator What this is Shared-memory threads for JavaScriptCore. new Thread(fn) runs fn on another thread, in the same heap, with the same objects. No structured clone, no message passing, no SharedArrayBuffer-only escape hatch. You share an object by sharing the object.

Status: parallel JavaScript executes, through all four JIT tiers, with no global lock — and the thread test suite now passes that way. It is not done: thread-sanitizer cleanup, fuzzing, one benchmark over budget, and a long soak stand between "tests pass" and anything more. The locked fallback mode and the threads-disabled configuration remain untouched and verified. The bring-up log at the bottom is honest about what broke and what it took. This PR exists so the design and the code can be read and argued with. It may never merge.

Article preview — originally published by Hacker News. Full story at the source.
Read full story on Hacker News → More top stories
Aggregated and edited by the Scoop newsroom. We surface news from Hacker News alongside other reporting so you can compare coverage in one place. Editorial policy · Corrections · About Scoop