When it comes to wasm, the Dispatcher for coroutines that is currently available is based on setTimeout in its implementation. I was wondering when a multi-threaded Dispatcher using WebWorkers will be implemented?
e
ephemient
04/27/2023, 7:35 AM
web workers don't share memory so that wouldn't fit the same programming model as other platforms
ephemient
04/27/2023, 7:37 AM
(yes there's SharedArrayBuffer, but the whole point of reference types/GC is to get away from untyped linear memory)
h
hikamaeng
04/27/2023, 7:40 AM
Thank you. I hadn't even considered the GC issue! In that case, I hope we can at least switch to a requestAnimationFrame-based approach like KotlinJS, which would not only address the GC problem but also be a good long-term solution.
e
ephemient
04/27/2023, 7:45 AM
long term, threads should exist in wasm and work with GC'able objects