Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThrottleLast not working reliably on MAUI using defaults #314

Open
gerdus opened this issue Feb 27, 2025 · 0 comments
Open

ThrottleLast not working reliably on MAUI using defaults #314

gerdus opened this issue Feb 27, 2025 · 0 comments

Comments

@gerdus
Copy link

gerdus commented Feb 27, 2025

This code does not work reliably (only reports a few values and then stops):

        docsyncsub = syncStateModel.DocumentsToSyncCount.ThrottleLast(TimeSpan.FromSeconds(3)).Subscribe((x) =>
        {
            Dispatcher.Dispatch(() =>
            {
                lblDebugDocCount.Text = $"{x}";
            });
        });

while this does work reliably:

        docsyncsub = syncStateModel.DocumentsToSyncCount.ThrottleLast(TimeSpan.FromSeconds(3), TimeProvider.System).Subscribe((x) =>
        {
            Dispatcher.Dispatch(() =>
            {
                lblDebugDocCount.Text = $"{x}";
            });
        });

syncStateModel.DocumentsToSyncCount is R3.BindableReactiveProperty
I have the UseR3 on builder in CreateMauiApp

Or is there something I am doing wrong or not understanding?

Thank you.

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

No branches or pull requests

1 participant