Closed wychi closed 7 years ago
ThrottleLast
is practically the same as sample
which in 2.x by default doesn't emit the last throttled item when the upstream completes. There is, however, a sample
overload that let's you configure that.
@akarnokd thanks for your answer.
According to that statement, the behavior in 2.x is expected. Is my understanding correct?
But I am still wondering why I get different result in testing code. Is it just something wrong in testing code? Or there is actual implementation different in 1.x?
Thanks
Yes, this is the expected behavior.
But I am still wondering why I get different result in testing code.
I've already told you. 2.x doesn't emit the last throttled item when the upstream completes (the underlying sample
operator was fixed in #4955) and 1.x does emit the very last (#3757).
Got it. Thank you a lot. Now I know the history behind this.
Hello there,
I am not sure if there is a bug or not, but I got different result when using throttleLast()
Here is my testing result. As you can see, there is a difference in handling onNext(5). 5 is emitted in 1.x but lost in 2.x
Here is my testing code
Just want to know which behavior is expected. Thanks