R3 icon indicating copy to clipboard operation
R3 copied to clipboard

ThrottleLast not working reliably on MAUI using defaults

Open gerdus opened this issue 1 year ago • 1 comments

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.

gerdus avatar Feb 27 '25 12:02 gerdus

Thank you. I made some changes to MAUI's TimeProvider the other day, so there may still be some problems. I'll check it out.

neuecc avatar Mar 03 '25 09:03 neuecc

This issue 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 Aug 31 '25 00:08 github-actions[bot]