How pause and then resume a thread?

Using wait() and notify() methods:

wait() – Causes the current thread to wait until another thread invokes the
notify() method or the notifyAll() method for this object.

notify() – Wakes up a single thread that is waiting on this object’s monitor.

Leave a Comment