O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17.2. Thread states and multi-threading in C#

In C#, a thread can exist in the states shown in Figure 17.2. A thread must be in one (and only one) of these seven states at any one time.

Figure 17.2. Possible thread states in C#.

Some Java books may categorize threads which are 'ready to run' in a separate state, so that there are 'ready to run' threads (also known as 'runnable'), and 'running' threads. In a single-CPU machine, only one thread can be in the running state, while all the rest are in the ready to run pool. In Figure 17.2, I have not differentiated between ready to run and running. All threads which are ready to run, are considered ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required