Chapter 26. Thread Basics

In this chapter:

Why Does Windows Support Threads?

Thread Overhead

Stop the Madness

CPU Trends

CLR Threads and Windows Threads

Using a Dedicated Thread to Perform an Asynchronous Compute-Bound Operation

Reasons to Use Threads

Thread Scheduling and Priorities

Foreground Threads vs. Background Threads

What Now?

In this chapter, I introduce the basic concepts concerning threads, and I offer a way for developers to conceptualize about them and their use. I’ll explain why Windows introduced the concept of threads, CPU trends, the relationship between common language runtime (CLR) threads and Windows threads, the overhead associated with using threads, how Windows schedules threads, the Microsoft .NET Framework classes that expose thread ...

Get CLR via C#, Fourth Edition 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.