Feb 21 · 6 min read · Flow cancellation is not an optional feature. It is a core part of how coroutines are designed to behave. When a collector stops collecting, the entire upstream flow is cancelled automatically. This i
Join discussionFeb 18 · 3 min read · buffer() in Chapter 23 was all about “queue everything” when the consumer is slow. Now we look into conflate() which is all about “dropping intermediate values” and caring only about the latest value. The Core Idea When the consumer is slow: buffer(...
Join discussionFeb 17 · 2 min read · There are real-world cases where producer is faster than consumer. By default, Flow is sequential. That means: Upstream emits Downstream processes Only then next value emits This is slow but safe. But differing speeds of producers and consumers ...
Join discussionFeb 16 · 6 min read · In this chapter we learn how to recover from failure automatically. Business Scenario Assumption: Country analytics calls a remote pricing service. That service sometimes fails. We want to retry a few times before giving up. This is exactly what...
Join discussion