🎓 Get the full 15+ hour-long Course "Kotlin Coroutines and Flow for Android Development" with a nice discount here: https://www.lukaslechner.com/coroutines-flow-android?source=youtube
👨🎓 Here is the link to the Github Example Repository: https://github.com/LukasLechnerDev/Kotlin-Coroutine-Use-Cases-on-Android
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: https://www.youtube.com/channel/UCr9FeEqCspjGTiOc3HplCqw?sub_confirmation=1
🌎 Check out my website: https://www.lukaslechner.com
📬 Subscribe to my newsletter: https://www.lukaslechner.com/newsletter/
➤ Follow me on twitter: https://twitter.com/LukasLechnerDev
Download
0 formats
No download links available.
How to handle Backpressure aka BufferOverflows | Kotlin Flow for Android Development | NatokHD