logo

Crowdly

In our working producer and consumer solutions with a single buffer slot using c...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

In our working producer and consumer solutions with a single buffer slot using condition variables, we made the producer check that count was 0 in a while loop and the consumer similarly check that it was 1 in a while loop. Why is a while loop necessary here instead of an if statement?
More questions like this

Want instant access to all verified answers on moodle31.upei.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!