Hi, guys. I’m looking into ktor-client samples. Is...
# ktor
u
Hi, guys. I’m looking into ktor-client samples. Is it correct that ktor-client in it’s iOS example does the work in main (UI) thread (
dispatch_get_main_queue()
): https://github.com/ktorio/ktor-samples/blob/86832e4fcfeb4de9da12b2ed3a0eaa0bed9795ab/mpp/client-mpp/src/iosMain/kotlin/io/ktor/samples/mpp/client/Dispatcher.kt#L7 Does it mean all networking (by ktor-client) happens in main thread actually? Android’s in contrast is executed in background thread (pooled) (
Dispatchers.Default
): https://github.com/ktorio/ktor-samples/blob/86832e4fcfeb4de9da12b2ed3a0eaa0bed9795ab/mpp/client-mpp/src/main/java/io/ktor/samples/mpp/client/ApplicationDispatcher.kt#L5
c
Yes, it is correct: actual I/O operations are done asynchronously anyway