This is more inclined towards general Operating Systems, and I'm not sure if and how it exists in Java, but I was learning about Semaphores.
In a book it says that if the signal operation is done on a semaphore, it awakes a thread(im paraphrasing)
If the semaphore has a value of -5, and a thread signals, a thread can wake up. But that doesn't make sense to me cause it would still remain in the while loop as its value is still <= 0(-4)