Hi,
There’s an explanation as to why we should use notifyAll rather than notify for the producer-consumer problem which seems correct. Though while implementing the Counting semaphore, wouldn’t we run into the same issue, then why are we using notify here instead of notifyAll?
Thanks,