obobo
06/24/2021, 6:06 PMflow{}
builder, can I somehow guarantee that the code in the flow{}
will run inside a specific dispatcher but the code that collects the results sent by `emit()`will run in a less-restricted dispatcher?knthmn
06/25/2021, 1:48 AM.flowOn()
affects the dispatcher upstream and is what you need
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow-on.html