|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
RAII guard for condition variable cancellation registration. More...
#include <thread_pool.H>
Public Member Functions | |
| ConditionVariableRegistration ()=default | |
| Default constructor. | |
| ConditionVariableRegistration (std::shared_ptr< CancellationState > state, std::condition_variable *cv) noexcept | |
| Construct with shared state and condition variable. | |
| ConditionVariableRegistration (const ConditionVariableRegistration &)=delete | |
| Deleted copy constructor. | |
| ConditionVariableRegistration & | operator= (const ConditionVariableRegistration &)=delete |
| Deleted copy assignment operator. | |
| ConditionVariableRegistration (ConditionVariableRegistration &&other) noexcept | |
| ConditionVariableRegistration & | operator= (ConditionVariableRegistration &&other) noexcept |
| ~ConditionVariableRegistration () | |
Private Member Functions | |
| ConditionVariableRegistration (std::shared_ptr< cancellation_detail::Exact_State > state, const std::list< cancellation_detail::Locked_Observer >::iterator it) noexcept | |
| void | unregister () noexcept |
Private Attributes | |
| std::shared_ptr< CancellationState > | state_ |
| std::condition_variable * | cv_ = nullptr |
| std::shared_ptr< cancellation_detail::Exact_State > | locked_state_ |
| std::list< cancellation_detail::Locked_Observer >::iterator | locked_ {} |
Friends | |
| class | CancellationToken |
RAII guard for condition variable cancellation registration.
Destroying or assigning the guard ends its registration, once any notification of it in progress has finished; moving it transfers the registration. Another registration of the same condition variable, made by another call, stays. The condition variable, and the mutex of a registration made with notify_on_cancel(cv, mutex), may be destroyed when no registration refers to them any more.
Definition at line 311 of file thread_pool.H.
|
inlineprivatenoexcept |
Definition at line 320 of file thread_pool.H.
|
default |
Default constructor.
|
inlinenoexcept |
Construct with shared state and condition variable.
| state | Shared cancellation state. |
| cv | Condition variable to register. |
Definition at line 346 of file thread_pool.H.
|
delete |
Deleted copy constructor.
|
inlinenoexcept |
Definition at line 356 of file thread_pool.H.
|
inline |
Definition at line 379 of file thread_pool.H.
References unregister().
|
inlinenoexcept |
Definition at line 364 of file thread_pool.H.
References cv_, locked_, locked_state_, state_, and unregister().
|
delete |
Deleted copy assignment operator.
|
inlineprivatenoexcept |
Definition at line 327 of file thread_pool.H.
References Aleph::and, cv_, locked_, locked_state_, and state_.
Referenced by ~ConditionVariableRegistration(), and operator=().
|
friend |
Definition at line 325 of file thread_pool.H.
|
private |
Definition at line 314 of file thread_pool.H.
Referenced by operator=(), and unregister().
|
private |
Definition at line 318 of file thread_pool.H.
Referenced by operator=(), and unregister().
|
private |
Definition at line 317 of file thread_pool.H.
Referenced by operator=(), and unregister().
|
private |
Definition at line 313 of file thread_pool.H.
Referenced by operator=(), and unregister().