Open javaJake opened 6 years ago
Hi, thanks for the report!
workarounds typically involve take..
One suggestion is to use publish()
on the source so that it can also be passed to a take_until()
added after the debounce()
.
I had my eyes on take_until as well. Thank you for the publish suggestion!
I ended up going with a workaround like this:
.tap(
[](...){}, // on_next
[](std::exception_ptr){ // on_error
// set closed here
},
[](){ // on_completed
// set closed here
}
)
.debounce(...)
.take_while([](...){
// check closed here
})
Any update on this bug?
This is easy to reproduce by editing the test code under the scenario "debounce - no overlap" and given "a source" from:
to:
According to my understanding of debounce through RxJava and RxMarbles, this last 4th element should be forgotten.
I'm still trying to figure out a workaround.