Join Slack
Powered by
How do I run busy code without blocking on multipl...
# compose
m
martmists
09/22/2025, 11:33 AM
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
Michael Paus
09/22/2025, 12:30 PM
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
martmists
09/22/2025, 1:46 PM
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
Open in Slack
Previous
Next