6#include "declarations.hpp"
99 bool _try_acquire_or_wait(Node*);
105 _counter(max_workers) {
108inline bool Semaphore::_try_acquire_or_wait(Node* me) {
115 _waiters.push_back(me);
class to create a semophore object for building a concurrency constraint
Definition semaphore.hpp:68
Semaphore(size_t max_workers)
constructs a semaphore with the given counter
Definition semaphore.hpp:104
size_t count() const
queries the counter value (not thread-safe during the run)
Definition semaphore.hpp:127
taskflow namespace
Definition small_vector.hpp:27