3 ms·
> the Wasm-functions you call will return immediately That can't be right. Doesn't JS block on the call, like any old function? The wasm function returns a val
by tantalor 6y ago
> the Wasm-functions you call will return immediately
That can't be right. Doesn't JS block on the call, like any old function? The wasm function returns a value, not a promise/thenable. So if the wasm function takes a long time/forever, it will not "return immediately".
- brundolf 6y agoI think by "immediately" he specifically meant "synchronously". He contrasted with web workers which run in separate threads, which means that they send messages back in an asynchronous promise.
- hombre_fatal 6y agoThey're expressing surprise that, unlike their experience with WebWorkers, you get to interface with Wasm/JS directly rather than through an async boundary.