</>EmbeddedInterview

How do you implement producer-consumer synchronization?

MediumCoding: Concurrency Primitives

Use a bounded queue protected by a mutex and two condition variables for not-empty and not-full; wait in predicate loops.