Friday, December 02, 2005

Multithreading with the BackgroundWorker Component

.NET has tremendous support for asynchronous and multi-threaded programming. In previous versions, we had the Timer, asynchronous method invocation, the ThreadPool, and the Thread class. For lightweight processing parlour tricks, the Timer works fine. For lightweight asynchronous behavior, we can use BeginInvoke and EndInvoke. For real multi-threading, the ThreadPool was the recommended way to go.

The BackgroundWorker combines the ease of using the Timer component with the ease of the asynchronous invocation. It makes multi-threading available as a component. The BackgroundWorker is a component that is built on top of easy-to-use multi-threading.
read more...

No comments: