Multithreaded JavaScript

Erik Arvidsson’s photo, title “Multithreaded JavaScript”, and two code examples using Thread, Lock, and asyncJoin() to share objects between threads.

Erik Arvidsson builds shared-memory threads three times. First, in the Porffor compiler with Thread, Lock, and Condition, where threads share one heap, unlike workers. Then @arv/threads, a TypeScript ownership checker with Sending<T>, Shared<T>, and shared structs. Finally, @arv/structs, a runtime and compiler that follow the TC39 structs proposal with shared struct and Atomics.Mutex. Each comes with a playground.

blog.arv.tools/archives/2026/11/02/18.35.20