hi guys I am new to kmp I am trying to work on a s...
# multiplatform
r
hi guys I am new to kmp I am trying to work on a sample project, I was planning to use coroutines. I need to understand how can I implement
<http://dispatchers.io|dispatchers.io>
in iosMain. 🙏
r
@Chetan Sachdeva so I see this one is for UI, this cannot be used for
io
?
c
You can use the same for IO. Consider reading the official post or this blog. We are setting both Dispatchers with the iOS main queue, that’s because background threading is not ready yet, at least in a simple way. It’s not a problem since the HTTP call will be handled in background by Ktor. But in iOS, all the subsequent processing will take place on the Main thread meanwhile, in Android we can switch between Background and Main Dispatchers.
However, there are ways to do background work in native. You can check DroidconKotlin.
r
thanks