|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Enhanced condition variable wrapper with timeout and predicate support. More...
#include <sync_primitives.h>

Public Member Functions | |
| condition_variable_wrapper ()=default | |
| ~condition_variable_wrapper ()=default | |
| condition_variable_wrapper (const condition_variable_wrapper &)=delete | |
| condition_variable_wrapper & | operator= (const condition_variable_wrapper &)=delete |
| condition_variable_wrapper (condition_variable_wrapper &&)=default | |
| condition_variable_wrapper & | operator= (condition_variable_wrapper &&)=default |
| template<typename Lock > | |
| void | wait (Lock &lock) |
| Wait indefinitely for notification. | |
| template<typename Lock , typename Predicate > | |
| void | wait (Lock &lock, Predicate predicate) |
| Wait with predicate until condition is met. | |
| template<typename Lock , typename Rep , typename Period > | |
| bool | wait_for (Lock &lock, const std::chrono::duration< Rep, Period > &timeout) |
| Wait with timeout. | |
| template<typename Lock , typename Rep , typename Period , typename Predicate > | |
| bool | wait_for (Lock &lock, const std::chrono::duration< Rep, Period > &timeout, Predicate predicate) |
| Wait with timeout and predicate. | |
| void | notify_one () noexcept |
| Notify one waiting thread. | |
| void | notify_all () noexcept |
| Notify all waiting threads. | |
| condition_variable_wrapper ()=default | |
| ~condition_variable_wrapper ()=default | |
| condition_variable_wrapper (const condition_variable_wrapper &)=delete | |
| condition_variable_wrapper & | operator= (const condition_variable_wrapper &)=delete |
| condition_variable_wrapper (condition_variable_wrapper &&)=default | |
| condition_variable_wrapper & | operator= (condition_variable_wrapper &&)=default |
| template<typename Lock > | |
| void | wait (Lock &lock) |
| Wait indefinitely for notification. | |
| template<typename Lock , typename Predicate > | |
| void | wait (Lock &lock, Predicate predicate) |
| Wait with predicate until condition is met. | |
| template<typename Lock , typename Rep , typename Period > | |
| bool | wait_for (Lock &lock, const std::chrono::duration< Rep, Period > &timeout) |
| Wait with timeout. | |
| template<typename Lock , typename Rep , typename Period , typename Predicate > | |
| bool | wait_for (Lock &lock, const std::chrono::duration< Rep, Period > &timeout, Predicate predicate) |
| Wait with timeout and predicate. | |
| void | notify_one () noexcept |
| Notify one waiting thread. | |
| void | notify_all () noexcept |
| Notify all waiting threads. | |
Private Attributes | |
| std::condition_variable | cv_ |
Enhanced condition variable wrapper with timeout and predicate support.
Definition at line 96 of file sync_primitives.h.
|
default |
|
default |
|
delete |
|
default |
|
default |
|
default |
|
delete |
|
default |
|
inlinenoexcept |
Notify all waiting threads.
Definition at line 153 of file sync_primitives.h.
References cv_.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
default |
|
default |
|
delete |
|
delete |
|
inline |
Wait indefinitely for notification.
| lock | Unique lock that must be held by calling thread |
Definition at line 106 of file sync_primitives.h.
References cv_.
|
inline |
Wait indefinitely for notification.
| lock | Unique lock that must be held by calling thread |
Definition at line 112 of file sync_primitives.h.
References cv_.
|
inline |
Wait with predicate until condition is met.
| lock | Unique lock that must be held by calling thread |
| predicate | Function that returns true when waiting should stop |
Definition at line 116 of file sync_primitives.h.
References cv_.
|
inline |
Wait with predicate until condition is met.
| lock | Unique lock that must be held by calling thread |
| predicate | Function that returns true when waiting should stop |
Definition at line 122 of file sync_primitives.h.
References cv_.
|
inline |
Wait with timeout.
| lock | Unique lock that must be held by calling thread |
| timeout | Maximum time to wait |
Definition at line 127 of file sync_primitives.h.
References cv_.
|
inline |
Wait with timeout.
| lock | Unique lock that must be held by calling thread |
| timeout | Maximum time to wait |
Definition at line 133 of file sync_primitives.h.
References cv_.
|
inline |
Wait with timeout and predicate.
| lock | Unique lock that must be held by calling thread |
| timeout | Maximum time to wait |
| predicate | Function that returns true when waiting should stop |
Definition at line 139 of file sync_primitives.h.
References cv_.
|
inline |
Wait with timeout and predicate.
| lock | Unique lock that must be held by calling thread |
| timeout | Maximum time to wait |
| predicate | Function that returns true when waiting should stop |
Definition at line 145 of file sync_primitives.h.
References cv_.
|
private |
Definition at line 158 of file sync_primitives.h.
Referenced by notify_all(), notify_one(), wait(), wait(), wait_for(), and wait_for().