The buffer operator

The buffer operator groups items emitted on the source observable based on different types of window selectors. These selectors can be defined via another observable, an item count, or time information. The following figure shows the marble diagram of the buffer operator:

Figure 9.1: The buffer operator

This operator has several prototypes:

Observable.buffer(self, buffer_openings=None,     buffer_closing_selector=None)Observable.buffer_with_count(self, count, skip=None)Observable.buffer_with_time(self, timespan,     timeshift=None, scheduler=None)Observable.buffer_with_time_or_count(self,     timespan, count, scheduler=None)

The ...

Get Hands-On Reactive Programming with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.