about wait() and notifyALL
hi everyone i have a question about using wait and notifyALL()
i am very confused about these two which i have never been able to use.
as per the API
wait() = Causes current thread to wait until either another thread invokes the notify() method or the notifyAll().
does the above wait() means that the current thread will wait as the monitor has already been in use by another thread. and will continue until the thread using the monitor releases the lock through notifyALL().
notifyall() = is notify all the threads waiting on the monitor.
i would really appreciate if somebody could post a simple code on wait and notifyALL().
thanks in advance.