Is intermediate flow operators are cancellable? Ar...
# flow
Is intermediate flow operators are cancellable? Are they cancelled when the calling scope is cancelled? For instance:
Copy code
// If the collecting scope is cancelled before this map operation,
// seems like map operation is not cancelled and throws an exception {
    // There is an operation which throws exception
I have to use
before mapping but is it the expected behaviour?
I can also use
but just curious why it is not cancelled itself since the calling scope is cancelled
Ok. Intermediate operators are not suspend functions and this is why they are not cancellable like normal coroutine suspend functions. They are in deed normal functions. So
should be used.