kevindmoore
07/16/2019, 5:01 AMAndrew Gazelka
07/16/2019, 5:06 AMkevindmoore
07/16/2019, 5:51 AMkralli
07/16/2019, 6:05 AMwithContext(<http://Dispatchers.IO|Dispatchers.IO>) { }
. And then you just program your asynchronous code like you would with coroutines.launch {
val text = withContext(<http://Dispatchers.IO|Dispatchers.IO>) { someFile.readText() }
println(text)
}
Paulius Ruminas
07/16/2019, 6:23 AM