Sunday, 14 July 2019

Thread States

Blocked

A thread that has suspended execution because it is waiting to acquire a lock.

New

A thread that has not begun execution.

Runnable

A thread that is currently executing or will execute when it gains access to the CPU.

Terminated

A thread that has completed execution.

Timed_waiting

A thread that has suspended execution for a specific period of time, such as when it has called sleep(). This state is also entered when a timeout version of wait() or join() is called.

Waiting

A thread that has suspended execution because of it is waiting for some action to occur. For eg it is waiting because of a call to a nontimeout version of wait() or join().

No comments:
Write comments