libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk > Class Template Reference

A flag to atomically signal if the container contains work or not and also count the amount of work that there is to do. More...

#include <thread_safe_adaptors.hpp>

Public Types

typedef Lk atomic_t
 
typedef atomic_t::lock_traits lock_traits
 
typedef lock_traits::exception_type exception_type
 
typedef atomic_t::locker_type locker_type
 

Public Member Functions

constexpr __stdcall signalling () noexcept(true) FORCE_INLINE
 
 signalling (atomic_t &ev) noexcept(true) FORCE_INLINE
 
__stdcall signalling (signalling const &s) noexcept(true) FORCE_INLINE
 
 signalling (signalling &&)=delete
 
void operator= (signalling const &)=delete
 
void operator= (signalling &&)=delete
 
constexpr atomic_t &__fastcall have_work () const noexcept(true) FORCE_INLINE
 
atomic_t &__fastcall have_work () noexcept(true) FORCE_INLINE
 
constexpr locker_type &__fastcall locker () const noexcept(true) FORCE_INLINE
 
locker_type &__fastcall locker () noexcept(true) FORCE_INLINE
 
void add () noexcept(false) FORCE_INLINE
 
void __fastcall add (typename atomic_t::count_type const c) noexcept(false) FORCE_INLINE
 
atomic_t::lock_result_type __fastcall remove () noexcept(noexcept(have_work_->lock(0))) FORCE_INLINE
 
void __fastcall remove (typename atomic_t::count_type const c) noexcept(false) FORCE_INLINE
 
atomic_t::lock_result_type __fastcall try_remove () noexcept(noexcept(have_work_->try_lock())) FORCE_INLINE
 
void clear () noexcept(noexcept(have_work_->clear())) FORCE_INLINE
 
atomic_t::count_type __fastcall count () const noexcept(noexcept(have_work_->count())) FORCE_INLINE
 

Static Public Attributes

static constexpr generic_traits::memory_access_modes memory_access_mode =atomic_t::memory_access_mode
 

Detailed Description

template<class Lk>
class jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >

A flag to atomically signal if the container contains work or not and also count the amount of work that there is to do.

This uses standard locks.

Definition at line 121 of file thread_safe_adaptors.hpp.

Member Typedef Documentation

◆ atomic_t

template<class Lk >
typedef Lk jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::atomic_t

Definition at line 123 of file thread_safe_adaptors.hpp.

◆ exception_type

template<class Lk >
typedef lock_traits::exception_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::exception_type

Definition at line 125 of file thread_safe_adaptors.hpp.

◆ lock_traits

template<class Lk >
typedef atomic_t::lock_traits jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::lock_traits

Definition at line 124 of file thread_safe_adaptors.hpp.

◆ locker_type

template<class Lk >
typedef atomic_t::locker_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::locker_type

Definition at line 126 of file thread_safe_adaptors.hpp.

Constructor & Destructor Documentation

◆ signalling() [1/4]

template<class Lk >
constexpr __stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::signalling ( )
inlineconstexprnoexcept

Definition at line 137 of file thread_safe_adaptors.hpp.

◆ signalling() [2/4]

template<class Lk >
jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::signalling ( atomic_t ev)
inlineexplicitnoexcept

Definition at line 140 of file thread_safe_adaptors.hpp.

◆ signalling() [3/4]

template<class Lk >
__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::signalling ( signalling< Lk > const &  s)
inlinenoexcept

Definition at line 144 of file thread_safe_adaptors.hpp.

◆ signalling() [4/4]

template<class Lk >
jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::signalling ( signalling< Lk > &&  )
delete

Member Function Documentation

◆ add() [1/2]

template<class Lk >
void jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::add ( )
inlinenoexcept

Definition at line 170 of file thread_safe_adaptors.hpp.

◆ add() [2/2]

template<class Lk >
void __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::add ( typename atomic_t::count_type const  c)
inlinenoexcept

Definition at line 177 of file thread_safe_adaptors.hpp.

◆ clear()

template<class Lk >
void jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::clear
inlinenoexcept

Definition at line 71 of file thread_safe_adaptors_impl.hpp.

◆ count()

template<class Lk >
ppd::signalling< Lk >::atomic_t::count_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::count
inlinenoexcept

Definition at line 77 of file thread_safe_adaptors_impl.hpp.

◆ have_work() [1/2]

template<class Lk >
constexpr atomic_t& __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::have_work ( ) const
inlineconstexprnoexcept

Definition at line 153 of file thread_safe_adaptors.hpp.

◆ have_work() [2/2]

template<class Lk >
atomic_t& __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::have_work ( )
inlinenoexcept

Definition at line 157 of file thread_safe_adaptors.hpp.

◆ locker() [1/2]

template<class Lk >
constexpr locker_type& __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::locker ( ) const
inlineconstexprnoexcept

Definition at line 161 of file thread_safe_adaptors.hpp.

◆ locker() [2/2]

template<class Lk >
locker_type& __fastcall jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::locker ( )
inlinenoexcept

Definition at line 165 of file thread_safe_adaptors.hpp.

◆ operator=() [1/2]

template<class Lk >
void jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::operator= ( signalling< Lk > &&  )
delete

◆ operator=() [2/2]

template<class Lk >
void jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::operator= ( signalling< Lk > const &  )
delete

◆ remove() [1/2]

template<class Lk >
ppd::signalling< Lk >::atomic_t::lock_result_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::remove
inlinenoexcept

Definition at line 50 of file thread_safe_adaptors_impl.hpp.

◆ remove() [2/2]

template<class Lk >
void jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::remove ( typename atomic_t::count_type const  c)
inlinenoexcept

Definition at line 57 of file thread_safe_adaptors_impl.hpp.

◆ try_remove()

template<class Lk >
ppd::signalling< Lk >::atomic_t::lock_result_type jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::try_remove
inlinenoexcept

Definition at line 65 of file thread_safe_adaptors_impl.hpp.

Member Data Documentation

◆ memory_access_mode

template<class Lk >
constexpr generic_traits::memory_access_modes jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::signalling< Lk >::memory_access_mode =atomic_t::memory_access_mode
staticconstexpr

To assist in allowing compile-time computation of the algorithmic order of the threading model.

Definition at line 131 of file thread_safe_adaptors.hpp.


The documentation for this class was generated from the following files: