Join Slack
Powered by
How do we cancel flow collections before all items...
# 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
2
Views
Open in Slack
Previous
Next