Condition synchronization & Mutual exclusion
Condition synchronization & Mutual exclusion
Although only one thread may be executing inside a monitor at a time, a wait operation (which suspends a thread inside the monitor) will allow another thread to enter the monitor. Waiting threads effectively exit the monitor.
If this was not the case and a suspended thread retained the monitor lock then no other thread could enter the monitor - the waiting thread could never be resumed.
data