R3 icon indicating copy to clipboard operation
R3 copied to clipboard

Fix DebounceFrame and ThrottleLastFrame behavior on re-entry

Open GallopingDino opened this issue 11 months ago • 2 comments

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);

GallopingDino avatar Mar 22 '25 19:03 GallopingDino

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.

github-actions[bot] avatar Sep 19 '25 00:09 github-actions[bot]

This is still relevant, do not close.

GallopingDino avatar Oct 15 '25 16:10 GallopingDino