Long term solution or alternative for System.Timer

1 Answer 118 Views
General Discussions
Jonathan
Top achievements
Rank 1
Iron
Jonathan asked on 02 Jan 2026, 03:21 PM

I followed the example provided here

Blazor Rebind Grid from Timer - Telerik UI for Blazor

And we have a working instance of this in our website.  However, the app is being used in an environment where a particular Telerik Chart and Grid are being left on for days at a time.  Now I believe the issue is actually with System.Timer.Timer and Blazor more than any Telerik control.

System.Timer.Timer will create a thread process on the Client server side.  This leads us into multi-threaded thread management and lifetimes and there are a number of things that may interfere. After a long period, per example more than 1 day, the timer stops working. And if the thread is working and the Blazor app does not properly call Dispose() then the thread could become orphaned.

Is there a better way to manage this with C# and Blazor?  Theoretically I could have 100 users with 100 different timers as provided in the example above. Optimistically, I need only 1 timer to exist on the server, and some sort of API that polls the 1 timer I have against 100 clients.  This means I am moving the timer from a C# System.Timer.Timer thread on the server towards a JavaScript based timer on the client, yes?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Jan 2026, 10:27 AM

Hello Jonathan,

Yes, switching to a JavaScript-based refresh mechanism is a reasonable option in this case.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Iron
Answers by
Dimo
Telerik team
Share this question
or