Description
Hi. Recently I found that sample
operator drops last value before onCompleted
event. This is behaviour is valid according to these discussions #566 and #571 and this test. It originated in Rx.NET and still exists in RxJava to be consistent across all implementations as far as I understood.
But, marble diagram in documentation shows otherwise: item 5 is emitted before termination and sampled by sampler.
This behaviour is odd and unexpectable. I stumbled across it trying to resolve backpressure issue with observables where last emitted item is the most important.
So, my question is whether it can be changed? I prepared a commit with fixes and corresponding tests.
Or at least marble diagram should be changed to showcase this behaviour and it would be good to have a note about it in documentation.
Thank you.