7#include "coopsync_tbb/detail/macros.hpp"
8#include "coopsync_tbb/detail/wait_queue.hpp"
50 template <
typename Lock>
51 void wait(Lock& lock);
63 template <
typename Lock,
typename Pred>
64 void wait(Lock& lock, Pred pred);
67 detail::wait_queue m_waiters;
70template <
typename Lock>
73 m_waiters.wait_if([] {
return true; });
79template <
typename Lock,
typename Pred>
condition_variable(const condition_variable &)=delete
The condition_variable is not copy-constructible.
condition_variable()=default
Constructs a new condition variable.
void notify_one()
Resumes one task suspended waiting on this condition variable, if there is any.
void notify_all()
Resumes all tasks suspended waiting on this condition variable.
condition_variable & operator=(const condition_variable &)=delete
The condition_variable is not copy-assignable.
condition_variable & operator=(condition_variable &&)=delete
The condition_variable is not move-assignable.
void wait(Lock &lock)
Suspends the calling task until it is notified.
Definition condition_variable.hpp:71
condition_variable(condition_variable &&)=delete
THe condition_variable is not move-constructible.
~condition_variable()
Destroys the condition variable.
Main namespace of the library, containing all public APIs.
Definition wait_for.hpp:11