🎓 Get the full 15+ hour-long Course "Kotlin Coroutines and Flow for Android Development" with a nice discount here: https://www.lukaslechner.com/coroutin...
👨🎓 Here is the link to the Github Example Repository: https://github.com/LukasLechnerDev/Ko...
In Kotlin Flows, if the producer is emitting items faster than the collector can process them, we get into a situation that is known as "Backpressure" or, as the Kotlin Flow documentation calls it "BufferOverflow"
In this video, you will learn how to deal with Backpressure / BufferOverflows by applying
the SUSPEND onBufferOverflow strategy
the DROP_OLDEST onBufferOverflow strategy
the DROP_LATEST onBufferOverflow strategy
TimeStamps:
00:00 Intro
00:17 explanation of the buffer operator
01:35 capacity of the buffer
02:56 onBufferOverFlow strategies
03:42 SUSPEND onBufferOverFlow strategy
08:14 DROP_OLDEST onBufferOverFlow strategy
11:00 DROP_LATEST onBufferOverFlow strategy
12:00 Unlimited buffer capacity
➤ Subscribe to the channel: / @lukaslechner
🌎 Check out my website: https://www.lukaslechner.com
📬 Subscribe to my newsletter: https://www.lukaslechner.com/newsletter/
➤ Follow me on twitter: / lukaslechnerdev