Question: What is the purpose of a condition variable? To control access to a shared resource by allowing only a limited number of threads to access
What is the purpose of a condition variable? To control access to a shared resource by allowing only a limited number of threads to access it at a time To allow threads to wait for a certain condition to become true before proceeding To prevent deadlocks by avoiding the conditions that can lead to them To ensure that a fixed number of threads can access a resource
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
