```GlobalScope.async { while (isActive) { ...
# coroutines
m
Copy code
GlobalScope.async {
    while (isActive) {
        println("test")
    }
}
This works on Android and jvm but doesn’t work on iOS. I don’t get any error, it just doesn’t do anything. Is it possible to make it work somehow?
GlobalScope.launch(context = <http://Dispatchers.IO|Dispatchers.IO>)
would be fine too I guess but I can’t see
<http://Dispatchers.IO|Dispatchers.IO>
on iOS 🤔
o
m
Oh.. so it's notnsupported yet.. thank you for the link. I think I saw a tweet from @kpgalligan saying that he was able to make it work in his iOS app 🤔
k
I haven’t been doing anything with GlobalScope, so I don’t know about that. For iOS, if you use the production version of coroutines, they’re single threaded and have other restrictions. There’s a draft PR with support for multiple threads.
There is a preview version of coroutines published that you can try out:
Copy code
1.3.3-native-mt
We’re using that with some almost-production code.
m
I'll try that, thanks!