mutex+conditional variable


This pattern is used for safe and efficient thread coordination.

Mutex ensures safety, Condition Variable ensures efficient waiting, together they provide correct and scalable thread synchronization.