O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

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

BackgroundWorker

Before concluding this chapter, we explore one more concept that’s closely related to synchronization and leverages the thread pool: the BackgroundWorker. What makes it different from the other mechanisms we’ve explored up to now is its place outside the System.Threading namespace. Instead, it’s defined in System.ComponentModel. One of the reasons for this is to reflect its use, typically related to UI programming.

The goal of BackgroundWorker is to make asynchrony easier to deal with. In many cases, background work has to be carried out without blocking the party that requested the work to be done in the first place. The requester and the worker move at their own paces, and therefore asynchrony results. However, this shouldn’t ...

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