Question
What is the purpose of signaling a condition variable?
Select an option. Your answer will be checked instantly.
Correct Answer: D. To notify one or more waiting threads that the relevant state may have changed
Explanation:
A signal makes an eligible waiter runnable so it can recheck the condition while holding the lock.
Because the condition may change again, awakened threads normally test it in a loop.
Leave a Reply