20 #include <condition_variable>
23 namespace SemaphoreShim_Namespace {
65 std::chrono::milliseconds(max_wait_in_ms),
66 [&is_ready =
is_ready_]() {
return is_ready; });
void try_acquire()
Blocks calling thread until it can acquire the semaphore, i.e. release is called by another thread...
bool try_acquire_for(const size_t max_wait_in_ms)
Blocks calling thread until it can acquire the semaphore, i.e. release is called by another thread...
void release()
Sets internal is_ready variable to true, allowing another thread waiting for the semaphore to proceed...
void reset()
Resets the semaphore's ready condition to false.
Utility type that implemnts behavior of a blocking binary semaphore, with an optional timeout...
std::condition_variable condition_