June 2018
Intermediate to advanced
348 pages
8h 45m
English
The Iterator pattern is the standard mechanism to pull data from STL containers, generators, and streams. They are well suited for data that has been aggregated in the space. Essentially, this means that we know ahead of time how much data is supposed to be retrieved, or that the data has already been captured. There are scenarios where the data arrives asynchronously and the consumers are not aware of how much data there is or when the data arrives. In such cases, Iterators need to wait, or we need to resort to timeout strategies to handle the scenario. In such a scenario, a push-based approach seems to be a better option. Using the Subject construct of Rx, we can use a fire and forget strategy. Let's write ...