T
T
themostserious2014-03-26 13:56:10
Java
themostserious, 2014-03-26 13:56:10

wait, notify, notifyAll methods in Object (Java): why do you think methods are defined in this particular class?

wait, notify, notifyAll are more suitable for threads - i.e., for example, the Thread class.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fat Lorrie, 2014-03-26
@themostserious

In order not to write extra code in simple cases. No one forbids using the Lock and Condition interfaces (which have analogues - await, signal, signalAll), which allow more flexible use of synchronization, for example, to implement several different locks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question