Dariusz Kuc
04/06/2021, 2:10 PMchannelFlow
? e.g.
flowOf(1, 2, 3).map {
id -> coroutineScope {
val first = async { retrieve(id) }
val second = async { retrieveOther(id) }
first.await() + second.await()
}
}
louiscad
04/06/2021, 2:14 PMemit
Dariusz Kuc
04/06/2021, 2:16 PMlouiscad
04/06/2021, 2:20 PMemit
calls code from the collector side directly, and you'd not expect it to be cancelled by the upstream flow code or have it run on an unknown dispatcher.emit
function calls the lambda of collect
.Dariusz Kuc
04/06/2021, 2:37 PM