Flow in context

Report a typo

In the following example, which operations will be executed in the IO dispatcher?

fun main() = runBlocking {
    flow { emit("Value") }       // 1
        .map { it.uppercase() }  // 2
        .flowOn(Dispatchers.IO)
        .map { it.lowercase() }  // 3
        .collect { print(it) }   // 4
}
Select one or more options from the list
___

Create a free account to access the full topic