Maciek
07/06/2020, 6:18 PMgildor
07/07/2020, 3:11 AMclass Foo {
val flow: Flow<Unit> = flow {
while (true) {
// TODO run heavyOperation only when someones collection flow
heavyOperation()
emit(Unit) // or any result of operation
delay(50)
}
}
}