O'Reilly logo

C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reporting progress to the UI from independent threads

So far, we have been using delegates with a synchronous execution to update the user interface from independent threads, without the need to implement loops using the BackgroundWorker component. How can we make many changes to the user interface from any independent thread without causing problems and avoiding great performance degradation?

We can do that in a very simple way using delegates with an asynchronous execution to update the UI many times in a thread without blocking it.

Note

The thread is not going to be blocked until the delegate completes the execution. However, the messages queued in the UI thread will be dispatched one after the other, with a synchronous execution. The only thing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required