Bounded producer-consumer queue
medium~25 min#c++#concurrency#condition-variable#queues
Implement a fixed-capacity queue that blocks producers when full and consumers when empty. Then explain the two things that make a naive condition-variable implementation wrong.
Solution — locked
Sign in to unlock this one
The solution opens once you explain the idea in your own words and it passes the grader — which needs an account to record. Signing in is free.
Log in