std::semaphore Implementation. More...
#include <Semaphore.h>
Public Member Functions | |
| semaphore (int initSign=0) | |
| Constructor Function. | |
| virtual | ~semaphore ()=default |
| Destructor Function. | |
| void | Sign (int sign) |
| Sign this semaphore with specific value. | |
| void | Increase () |
| Increase this semaphore sign. | |
| void | Wait (int sign) |
| Wait this semaphore until it owns equal sign with given. | |
| const int | GetSign () const |
| Get this semaphore current sign. | |
Private Attributes | |
| std::atomic_int | m_Sign |
| Sign of this semaphore. | |
| std::mutex | m_Mutex |
| Mutex of this semaphore. | |
| std::condition_variable | m_Cond |
| condition variable of this semaphore. | |
std::semaphore Implementation.
Definition at line 15 of file Semaphore.h.