4 ms·
In this version of web assembly only ! Web Assembly is gimped because it needs to be compatible with existing JS runtimes - when they add threading support you
by rubber_duck 8y ago
In this version of web assembly only !
Web Assembly is gimped because it needs to be compatible with existing JS runtimes - when they add threading support you will no longer be able to run a WASM shim in JS but at the same time WASM will become a lot more general purpose.
- TekMol 8y agoJavascript already has multithreading via webworkers. That's not something WASM will introduce.
- rubber_duck 8y agoSharedArrayBuffer is only available in chrome and FF and they disable it by default so no way to do standard multithreading via webworkers.
- TekMol 8y agoIt was disabled because of spectre. Multithreaded WASM isn't here either. I think WASM will face the same security considerations.
- untog 8y agoWebworkers are multithreading. You just have to use slower, async communication methods. WASM will likely be the same way, given the security considerations.
- pjmlp 8y agoWASM will have more low level support. https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md https://github.com/WebAssembly/threads/blob/master/proposals...
- johncolanduoni 8y agoExisting JS runtimes actually use shared-memory concurrency a ton, even ignoring the (currently disabled) SharedArrayBuffer. Code generation and garbage collection have at least some concurrent stages on all the major JS engines. JavaScriptCore even exposes this in its API.