What happens when you call notifyAll method on an object that is not waiting? Should there be exception or is it normal situation?
As you can see here, calling notifyAll() on an not waiting object does not have any effect.
It is completely normal. You can only notify all that waiting on one single monitor. Everybody else is not interested. The object on which you call notifyAll is just the monitor on which others are waiting. If nobody is waiting nobody has to be notified
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With