About This eBook by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

More About a Thread’s Life Cycle

So far, we’ve seen three states a thread can be in. You should be able to recite at least two of them. First of all, each new Thread instance represents a thread in a state where it hasn’t been started yet. Upon calling the Start method, the thread can enter the running state, where it’s executing code. A third state might not be immediately obvious because we haven’t talked about it much: A thread can be waiting for some operation to be completed, which is often referred to as being blocked.

Note: Blocking Is Hard

True blocking of threads is quite uncommon in the world of managed code. Because of the deep support for COM interoperability, the managed runtime has to make sure that threads can continue to dispatch ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required