Java Thread States

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

!!!Java Thread States

Overview

These states are virtual machine states which do not reflect any operating system thread states:

NEW

A thread that has not yet started.

RUNNABLE

A "RUNNABLE" thread may be using CPU or waiting for the results of an I/O operation.

BLOCKED

The thread is attempting to acquire a monitor lock that is currently being held by other thread.

WAITING

The thread called Object.wait(), released its all monitors and is waiting to be notified (by some other thread calling ) Object.notify()). The thread can be waiting indefinitely in this state.

TIMED_WAITING

A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state.

TERMINATED

A thread that exited.