Join Slack
How do we cancel flow collections before all items are collected? Should we throw a cancellationexce...
# coroutines
a
Allan Wang
09/26/2020, 8:11 AM
How do we cancel flow collections before all items are collected? Should we throw a cancellationexception like the internal
collectWhile
function?
g
gildor
09/26/2020, 3:09 PM
Yes, you can do this, but you also can do filter and just call .first() to get first value which passed your filter it will close flow
3
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by