|
Support Class Library
A set of tools providing classes and utility
|
Traits for actors that interact with the channel. More...
#include "Channel.h"
Public Types | |
| using | actor_type = Actor |
| The type of the actor. More... | |
| using | channel_type = typename actor_type::channel_type |
| The type of the channel. More... | |
| using | lock_type = typename channel_type::lock_type |
| The type of lock used by the channel. More... | |
| template<class L > | |
| using | guard_type = typename channel_type::template guard_type< L > |
| using | value_type = typename channel_type::value_type |
| The type of values transmitted through channels. More... | |
| using | queue_type = typename channel_type::queue_type |
| The type of the queue used in the channel. More... | |
Public Member Functions | |
| channel_actor_traits (actor_type &act) | |
| Construct a trait from a pointer to its actor. More... | |
| void | lock () |
| Lock the channel. More... | |
| void | unlock () |
| Unlock the channel. More... | |
| void | notify () |
| Notify the channel. More... | |
| void | wait () |
| Wait for the channel. More... | |
| template<class Pred > | |
| void | waitUntil (Pred &&pred) |
| Wait for the channel until a condition is met. More... | |
| template<class Rep , class Period > | |
| std::cv_status | waitFor (const std::chrono::duration< Rep, Period > &time) |
| Wait for a specific duration for the channel. More... | |
| template<class Rep , class Period , class Pred > | |
| bool | waitFor (const std::chrono::duration< Rep, Period > &time, Pred &&pred) |
| Wait for a given period of time until the predicate is satisfied. More... | |
Public Attributes | |
| actor_type * | actor |
| A (safe) pointer to the actor. More... | |
| std::unique_lock< lock_type > | lock_ |
| The handle to the channel's lock. More... | |
Traits for actors that interact with the channel.
| Actor | being the type of the actor |
| scl::async::details::channel_actor_traits< Actor >::actor_type |
| scl::async::details::channel_actor_traits< Actor >::channel_type |
| scl::async::details::channel_actor_traits< Actor >::guard_type |
| scl::async::details::channel_actor_traits< Actor >::lock_type |
| scl::async::details::channel_actor_traits< Actor >::queue_type |
| scl::async::details::channel_actor_traits< Actor >::value_type |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Wait for a specific duration for the channel.
| Rep | being the time representation type |
| Period | being the time period type |
| time | being the time to wait |
|
inline |
Wait for a given period of time until the predicate is satisfied.
| Rep | being the time representation type |
| Period | being the time period type |
| time | being the time to wait |
| pred | being the predicate to satisfy |
|
inline |
| actor_type* scl::async::details::channel_actor_traits< Actor >::actor |
| std::unique_lock<lock_type> scl::async::details::channel_actor_traits< Actor >::lock_ |
1.8.13