https://kotlinlang.org logo
#flow
Title
# flow
r

Ryan Pierce

09/08/2020, 3:42 AM
If you have a buffered SharedFlow with a slow and fast collector, and the fast collector finishes collecting the most recent value, does the fast collector suspend until the slow collector finishes collecting that same most recent value? Or does the fast collector pull the next value from the buffer and get ahead of the slow collector? If the latter, is the total buffer space (replay + extraBuffer) equal to the amount of values a fast collector can get ahead of a slow collector?
@elizarov Would you be able to answer this?
e

elizarov

09/18/2020, 5:32 AM
Yes. That’s exactly what buffer space is for.
👍 1