Waiting State in a Thread

Q

What are three ways in which a thread can enter the waiting state?

✍: FYIcenter

A

A thread can enter the waiting state by invoking its sleep() method, by blocking on IO, by unsuccessfully attempting to acquire an object's lock, or by invoking an object's wait() method. It can also enter the waiting state by invoking its (deprecated) suspend() method.

2007-03-03, 6092👍, 0💬