Programming with Threads

Asynchronous programming provides you with access to lightweight multithreading. The ThreadPool and Thread classes provide you with heavyweight multithreading. The ThreadPool class manages a collection of worker-thread objects waiting for work. Because ThreadPool has threads waiting around, this class may be more efficient to use. Alternatively, you can use the Thread class directly, but while this gives you a little more control, the Thread class also requires more responsibility.

As a general practice there is no reason why you cannot use the ThreadPool class for all your threading needs. The ThreadPool class is a bit easier to use, and you will get the same multithreaded performance results with a bit less work than ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.