Header Reference: <semaphore>
Header Reference: <semaphore>
Counting and binary semaphore facilities from <semaphore>.
Header Reference: <semaphore>
Counting and binary semaphore facilities from <semaphore>.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Header reference pages are meant to answer a practical question quickly: what this header provides, when to reach for it, and which usage rules are easiest to get wrong.
<semaphore>std::counting_semaphorestd::binary_semaphoreUse <semaphore> for permit-based coordination, throttling, and capacity management across threads.
#include <semaphore>
int main() {
// Use this header when you need explicit coordination between tasks.
return 0;
}