Skip to content

Fix DebounceFrame and ThrottleLastFrame behavior on re-entry - #318

Open
GallopingDino wants to merge 1 commit into
Cysharp:mainfrom
GallopingDino:fix/debounce-frame-reentry
Open

Fix DebounceFrame and ThrottleLastFrame behavior on re-entry#318
GallopingDino wants to merge 1 commit into
Cysharp:mainfrom
GallopingDino:fix/debounce-frame-reentry

Conversation

@GallopingDino

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown
Contributor

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 github-actions Bot added the stale label Sep 19, 2025
@GallopingDino

Copy link
Copy Markdown
Author

This is still relevant, do not close.

@github-actions github-actions Bot removed the stale label Oct 16, 2025
@github-actions

Copy link
Copy Markdown
Contributor

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 github-actions Bot added the stale label Apr 14, 2026
@GallopingDino

Copy link
Copy Markdown
Author

Still relevant.

@github-actions github-actions Bot removed the stale label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant