Question
What happens when a thread executes wait on a condition variable inside a monitor?
Select an option. Your answer will be checked instantly.
Correct Answer: C. It releases the associated lock and sleeps until the condition is signaled
Explanation:
Condition-variable wait atomically releases the monitor lock and blocks the caller.
After awakening, the thread reacquires the lock before continuing.
Leave a Reply