How do I run busy code without blocking on multipl...
# compose
m
How do I run busy code without blocking on multiplatform? I tried running it on Dispatchers.Unconfined but it still seems to hang main thread on WASM
m
WASM is single threaded. If you have really busy code, then you have to move it to a worker. See: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API
m
Are there any examples on how to use these from Kotlin/Compose? I see DedicatedWorkerGlobalScope mentioned but it doesn't seem to exist in KMP, and in WASM it's not a CoroutineScope like the normal GlobalScope