R3
R3 copied to clipboard
Fix DebounceFrame and ThrottleLastFrame behavior on re-entry
Previously, if DebounceFrame.OnNext was invoked synchronously during _DebounceFrame.observer.OnNext, the incoming value would be ignored. ThrottleLastFrame had the same problem. Below is a code sample illustrating this issue:
var publisher = new Subject<int>();
publisher.DebounceFrame(1)
.Subscribe(value =>
{
if (value == 1)
{
publisher.OnNext(2);
} else if (value == 2)
{
// We'll never get here
}
});
publisher.OnNext(1);
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This is still relevant, do not close.