Hello all,
I put the Thread,Sleep(40 00) in one my background worker and now the UI is working like a charm.
As tlhintoq said, "Thread.sle ep is evil. It sleeps everything on that thread, including UI ".
User Profile
Collapse
-
Hi and thanks a lot for your quick answers !
1 ) I wrote the 2 " while " statement in order to force the order : Fetch then Compute then Show.
Before that, I had an exception telling me that backgroundWorke rFetchData was already working when it came back to the beginning of the loop.
...Code:while (backgroundWorkerFetchData.IsBusy) { Application.DoEvents();Leave a comment:
-
C# using BackgroundWorker and UI still freezes
Hello guys,
I have a problem of UI freeze with my application in C# which basically fetch datas, compute stats on these datas, wait for 4 seconds and do it again and again.
Following http://msdn.microsoft.com/en-us/libr...undworker.aspx
I used 2 background workers, 1 to fetch and the other one to compute stats. It then returns to the main thread which shows computed stats in...
No activity results to display
Show More
Leave a comment: