Summary

In this chapter, we had a look at how the .NET Framework supports thread concepts. We saw how:

  • We can use the Thread class to create and manage our own threads.

  • We can leverage the ThreadPool class to quickly and easily dispatch work onto multiple threads.

  • The various synchronization mechanisms help programmers avoid thread contention.

  • Variables can be created that are specific and local to individual threads.

The ability to control threads represents a very large step forward for Visual Basic developers, and the rich threading support in the .NET Framework makes syntax easy to understand and clear to implement.

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.