Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 352 Bytes

README.md

File metadata and controls

14 lines (10 loc) · 352 Bytes

semaphore c++11

Implement a simple semaphore interface:

wait() post() trywait()

There are two implementations available:

  • "semaphore" is blocking version that is implemented based on mutex and condition variable.

  • "semaphore_lockfree" is lock-less version that is implemented based on c++ atomic CAS (compare and swap).