Computer scienceMobileAndroidArchitecture

Coroutines in Android

Choose the dispatcher

Report a typo

Which built-in dispatcher will you use with this task?

class SomeViewModel : ViewModel() {

    suspend fun countSpaces(file: File): Int =
        withContext(______________) {
            file.useLines { it.map { it.count { it == ' ' } } }
        }

}
Enter a short text
___

Create a free account to access the full topic