Semaphores and Events for C++11
Submitted by michael on Tue, 12/30/2014 - 16:57The C++11 standard finally introduced mechanisms for platform independent multithreading and thread synchronisation. Unfortunately, the new language standard lacks a popular synchronisation primitive called semaphore (see The Little Book of Semaphores for an introduction). Fortunately, the built-in mutexes and condition_variables can be used to build fully-fledged semaphore objects: