Re:Moving from TypeScript to Rust / WebAssembly
by loxs on Friday July 10, 2020 @01:02AM
(#23788312)
No, JS runtimes don't do "fine" with concurrent operations, unless you are "waiting". If you are doing heavy processing, the whole service freezes. That's indeed the primary reason I need worker threads.
Erlang's runtime does "fine" with its preemptive concurrency model, JS runtimes are a joke in this regard.
Re:Moving from TypeScript to Rust / WebAssembly
by IggleSniggle on Friday July 10, 2020 @09:39AM
(#23791345)
Have you tried async generator functions?
On the WASM side: Does WASM support real threads yet? Otherwise moving to Rust wouldn't really help you? If it's just "WebWorker" like multiple runtimes, you might still pay serialization costs to move objects between workers.