@Chetan Sachdeva so I see this one is for UI, this cannot be used for
06/13/2020, 4:00 PM
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.