Quantcast
Channel: User Sinatr - Stack Overflow
Viewing all articles
Browse latest Browse all 601

Comment by Sinatr on How to run two functions periodically with a delay between them, without freezing the UI?

$
0
0
while(true) in UI thread is a problem, rather than Thread.Sleep. And the best solution depends: use timer to run small jobs periodically, create background task/thread to do a job and invoke, do all job in UI thread regularly releasing it by using await Task.Delay, fire-and-forget first task and use continuation to run second, etc.

Viewing all articles
Browse latest Browse all 601

Trending Articles