15#ifndef A_UTIL_UTIL_CONCURRENCY_DETAIL_SEMAPHORE_DECL_HEADER_INCLUDED
16#define A_UTIL_UTIL_CONCURRENCY_DETAIL_SEMAPHORE_DECL_HEADER_INCLUDED
30template <
typename Mutex,
typename CondVar>
31class basic_semaphore {
32 basic_semaphore(
const basic_semaphore&);
33 basic_semaphore& operator=(
const basic_semaphore&);
62 template <
typename Rep,
typename Period>
63 bool wait_for(
const std::chrono::duration<Rep, Period>& timeout);
void wait()
Decrement the counter, blocks until the count becomes non-zero (if neccessary)
Definition semaphore_impl.h:48
void notify()
Increment the counter and notify any waiters.
Definition semaphore_impl.h:40
bool is_set()
Definition semaphore_impl.h:79
basic_semaphore(int count=0)
Definition semaphore_impl.h:34
std::mutex _mutex
Definition semaphore_decl.h:75
void reset()
Reset the counter to 0.
Definition semaphore_impl.h:72
bool try_wait()
Definition semaphore_impl.h:58
int _lock_count
Definition semaphore_decl.h:77
std::condition_variable _cv
Definition semaphore_decl.h:76
bool wait_for(const std::chrono::duration< Rep, Period > &timeout)
Definition semaphore_impl.h:87
Serves as namespace for concurrency implementation details.
Definition concurrency.h:33
Definition concurrency.h:24
Serves as the root component, with common functionality documented in core functionality.
Definition base.h:24