Skip to main content


Showing posts from August, 2008

Basic Thread’s States

Life cycle of the thread is valuable in the large multithreading application. State of a thread specifies the current activities of the thread at any movement. There are four basic state of the thread. 1.      New – when the object of the class that representing a thread after creating the object, is created then before call the start method the thread can’t run. So it is called new state of the thread or in other words we can say that the thread is said to be in new state. It means the thread has been created and it is ready to run. 2.      Runnable -- Thread exists in several states. A thread that has been just created is in the new state. The thread remains in this state until the thread’s start method is called. This causes the thread to enter the runnable (ready) state when the system assigns a processor to the thread Running – A thread is said to be in the running state if it is executing instructions. The instructions are placed in the run method and when the ru