| 
    rippled
    
   | 
 
#include <semaphore.h>

Public Types | |
| using | size_type = std::size_t | 
Public Member Functions | |
| basic_semaphore (size_type count=0) | |
| Create the semaphore, with an optional initial count.   | |
| void | notify () | 
| Increment the count and unblock one waiting thread.   | |
| void | wait () | 
| Block until notify is called.   | |
| bool | try_wait () | 
| Perform a non-blocking wait.   | |
Private Attributes | |
| Mutex | m_mutex | 
| CondVar | m_cond | 
| std::size_t | m_count | 
Definition at line 57 of file semaphore.h.
| using ripple::basic_semaphore< Mutex, CondVar >::size_type = std::size_t | 
Definition at line 65 of file semaphore.h.
      
  | 
  explicit | 
Create the semaphore, with an optional initial count.
If unspecified, the initial count is zero.
Definition at line 70 of file semaphore.h.
| void ripple::basic_semaphore< Mutex, CondVar >::notify | ( | ) | 
Increment the count and unblock one waiting thread.
Definition at line 76 of file semaphore.h.
| void ripple::basic_semaphore< Mutex, CondVar >::wait | ( | ) | 
Block until notify is called.
Definition at line 85 of file semaphore.h.
| bool ripple::basic_semaphore< Mutex, CondVar >::try_wait | ( | ) | 
Perform a non-blocking wait.
true If the wait would be satisfied. Definition at line 97 of file semaphore.h.
      
  | 
  private | 
Definition at line 60 of file semaphore.h.
      
  | 
  private | 
Definition at line 61 of file semaphore.h.
      
  | 
  private | 
Definition at line 62 of file semaphore.h.