Kaanixir
08/15/2024, 4:50 AMWhile Dispatchers.Default and Dispatchers.IO are supported in Kotlin's coroutine model, their behavior on WASM is constrained by the current state of WebAssembly's threading support. These dispatchers typically rely on background threads or thread pools to offload tasks, but in WASM, where true multithreading is still experimental and not universally supported, these dispatchers will operate in a similar way to Dispatchers.Main, running tasks on the same main thread.
It almost sounds like what we're seeing here is a sophisticated scheduling optimization found precisely in Javascript target, which is constrained obviously by javascript's 1 main thread restriction. Right ?
edit: found on rust forums that WASM Threads are released for chrome already with atomic ops and SharedArrayBuffer
! but not for other browsers 🤔Artem Kobzar
08/15/2024, 7:39 AMPau Marzo
12/12/2024, 3:19 PMArtem Kobzar
12/12/2024, 3:31 PMPau Marzo
12/20/2024, 5:29 AMArtem Kobzar
12/20/2024, 12:08 PM