PreviousNext

Thread Operations

A thread changes states as it runs, waits to synchronize, or is ready to be run. A thread is in one of the following states:

· Waiting

The thread is not eligible to execute because it is synchronizing with another thread or with an external event.

· Ready

The thread is eligible to be executed by a processor.

· Running

The thread is currently being executed by a processor.

· Terminated

The thread has completed all of its work.

The following figure shows the transitions between states for a typical thread implementation.


Thread State Transitions

The operations that you can perform include starting, waiting for, terminating, and deleting threads.

More:

Starting a Thread

Terminating a Thread

Waiting for a Thread to Terminate

Deleting a Thread