logo

Crowdly

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

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

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?
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle31.upei.ca?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!