2 ms·
Web workers already exist and there's wasm threading libraries that target just web workers. https://github.com/w3reality/wasm-mt https://github.com/w3reality/
by nextaccountic 5y ago
Web workers already exist and there's wasm threading libraries that target just web workers.
https://github.com/w3reality/wasm-mt https://github.com/w3reality/wasm-mt
It's just that with sharedarraybuffers and atomics we unlock better performance and can match APIs of native OSes. But that's okay, we can still have a fallback for Safari (specially if we can architect the app so the threads only communicate by passing messages) and it shouldn't be a big deal.
- turnsout 5y agoYes, I've been using WebWorkers for 10 years. My note was intended to give folks a heads-up before they go rewriting their web app in C++ or Rust to take advantage of concurrency via SharedArrayBuffer.