Hello,
I'm having a little doubt about the following
thread problem. It supposes that if I remove the call to the notifyAll() method on the line 39, the threads that keep awaiting, for the call to the wait() method on the line 14, shouldn't become runnable. So the line 17 couldn't be reachable, since the rules says: "A waiting thread will not return to runnable when the lock is released, unless a notification occurs.".
But, this doesn't happen. I remove the notifyAll(), the result is the same than with the notifyAll().
Waiting for calculation...
Waiting for calculation...
Waiting for calculation...
Total is: 4950
Total is: 4950
Total is: 4950
Could anybody please help me find out why this is happening?
Thanks!