1 min readSep 12, 2019
Now try writing something like this:
val records = myDb.getRecord()
// check something
if (somethingIsNotRight) return someResult
record.consumeEach { ... }
See what happens. If you want to just straight to the answer, read Cold flows, hot channels.