Join Slack
Powered by
Hi, can I possibly collect a flow for as long as a...
# flow
s
Smorg
11/12/2020, 5:22 AM
Hi, can I possibly collect a flow for as long as a certain period? I can't seem to find an operator for that, that is, if I don't cancel this flow before this duration has elapsed, cancel it for me
e
ephemient
11/12/2020, 5:29 AM
like this?
https://pl.kotl.in/8KiO07sx7
s
Smorg
11/12/2020, 5:36 AM
Thanks. Was wondering if there was a declarative operator I could switch in, but withTimeout should do the trick
Smorg
11/12/2020, 5:55 AM
I don't know if you can answer this
@ephemient
, if I cancel the coroutine a flow is running in using the scope cancel method, do I need to handle the
CancellationException
coming from that?
2
Views
Open in Slack
Previous
Next