March 2004
Intermediate to advanced
560 pages
26h 47m
English
System.Threading.ThreadState defines the set of possible execution states for threads. Once a thread is created, it is in one or more of these states until it terminates. Not all combinations of ThreadState values are valid; for example, a thread cannot be in both the System.Threading.ThreadState.Stopped and System.Threading.ThreadState.Unstarted states.
The following table shows the actions that cause a thread to change state.
| Action | ThreadState after Action |
|---|---|
| The thread is created. | Unstarted |
| System.Threading.Thread.Start is invoked on the thread. | Running |
| The thread calls System.Threading.Thread.Sleep. | WaitSleepJoin |
| The thread calls System.Threading.Monitor.Wait to wait on an object. | WaitSleepJoin |
| The thread calls System.Threading.Thread.Join ... |
Read now
Unlock full access