In the previous section, we used Web Workers to move Wasm modules into worker threads, which allowed us to call Wasm functions without blocking the main thread. However, passing messages between worker threads has performance limitations. In an effort to address this issue, a threads feature was proposed for WebAssembly.
The proposal, currently in Phase 1, is described in detail at https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md. Per the proposal documentation, the threads feature adds a new shared linear memory type and some new operations for atomic memory access. This proposal is relatively limited in scope. Eberhardt provides the following elaboration in his blog post:
Although the feature wouldn't allow for the creation of threads, it provides a simpler way of sharing data between the worker threads we create in JavaScript.