https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

rattleshirt

12/20/2019, 9:36 AM
In the new native-mt model what would be the equivalent of Dispatchers.IO for iOS in a AppCoroutineDispatchers class with main = Main, computation = Default and io? Would that be
newSingleThreadContext("io")
?
Similar to what you would use in a viewModel to launch a coroutine:
viewModelScope.launch(<http://dispatchers.io|dispatchers.io>) {}
but now in common code
d

Dominaezzz

12/20/2019, 9:49 AM
Pretty much. (Better to ask in #coroutines)
k

Kris Wong

12/20/2019, 2:30 PM
my understating is that there's one default context with a worker, and a main context