For each item entering the state machine the items emitted from the state machine were buffered into a list and only emitted once the entering item was fully processed. At that point notifications were flatmapped and then dematerialized.
The old technique is to to do this:
materialize -> scan -> flatMap -> dematerialize
The new technique is to do this:
materialize -> flatMap using Observable.create and onBackpressureBuffer -> dematerialize
For each item entering the state machine the items emitted from the state machine were buffered into a list and only emitted once the entering item was fully processed. At that point notifications were flatmapped and then dematerialized.
The old technique is to to do this:
materialize
->scan
->flatMap
->dematerialize
The new technique is to do this:
materialize
->flatMap
usingObservable.create
andonBackpressureBuffer
->dematerialize