Moving out of a Blocked State
A thread must move out of a blocked state (or the not runnable state) into the runnable state using the opposite of whatever put it into the blocked state:
- If a thread has been put to sleep(), the specified timeout period must expire.
- If a thread called wait(), then someone else using the resource for which it is waiting must call notify() or notifyAll().
- If a thread is waiting for the completion of an input or output operation, then the operation must finish.
There is a method isAlive() that returns true if the method is running, runnable or blocked, and returns false if the method is a new thread or dead.