Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinFlow backpressure buffer conflateSingle-choice MCQ

When you call `.flowOn(Dispatchers.IO)` on a Flow, which part of the pipeline switches threads, and what hidden structural element does the operator insert to make this thread switch safe?

flow { emit(readFromDisk()) // A } .map { it.length } // B .flowOn(Dispatchers.IO) .collect { println(it) } // C