Most of the time, your computer's CPU is sitting idle. Paul Kimmel shows how easy it is to use multithreading with the new BackgroundWorker component in .NET 2.0, so you can stop your bored gadgetry from wasting all that idle time.

From the author of

From the author of

Multithreading for Greater Productivity

If you’ve ever looked at your microprocessor’s performance in the
Task Manager’s CPU usage history and list of processes, you might have
noticed that your PC’s microprocessor’s most active task is the idle
process. In fact, your CPU is most often in what we can only call the
"relaxing" state. Even for developers with heavy-duty compilers, CASE
tools, and UML tools, most of the computer’s hardware is underutilized;
that is, software generally isn’t using most of the resources
available.

One way to improve application performance and use more of your
computer’s bandwidth is to add multithreading to your software. The
problem historically is that many tools, such as Visual Basic 6, didn’t
easily support multithreading. In general, multithreading has been the purview
of only the most experienced programmers.

Not anymore.

.NET 2.0 introduces the BackgroundWorker component, which makes it
easier than ever to incorporate multithreading into your applications, and
I’m going to show you just how easy the component is to use.

NOTE

This article is written in Visual Basic .NET, but adapted from my book C#
for the Professional Programmer.