|
|
|
|
|
by graetzer
2353 days ago
|
|
Its usually a good idea to hold the lock because the other thread(s) might not have called wait() yet. As a rule of thumb: its usually a bug to not hold the lock before notify(), unless you synchronize it with another condition |
|
But yeah, in general I agree with the advice.. I'm pretty sure I've made that mistake before.