|
typedef safe_colln< C, M, WL, Sig, typename lock::any_order::all< M::lock_traits::api_type, typename M::lock_traits::model_type, M, M > > | base_t |
|
typedef base_t::thread_traits | thread_traits |
|
typedef base_t::container_type | container_type |
|
typedef base_t::write_lock_type | write_lock_type |
|
typedef base_t::read_lock_type | read_lock_type |
|
typedef base_t::atomic_t | atomic_t |
|
typedef container_type::reference | reference |
|
typedef container_type::const_reference | const_reference |
|
typedef container_type::size_type | size_type |
|
typedef container_type::value_type | value_type |
|
typedef ValRet | value_ret_type |
|
typedef C | container_type |
| The container to be adapted. More...
|
|
typedef Sig | have_work_type |
| Used to enable functionality to atomically signal if the container contains work or not. More...
|
|
typedef M | atomic_t |
| The underlying lock object to use that will be locked in some (EREW or CREW or other) manner. More...
|
|
typedef WL | write_lock_type |
| The type of write-lock to use. This allows the possibility of using a read-write lock. More...
|
|
typedef atomic_t::read_lock_type | read_lock_type |
| The type of read lock to use, by default the write lock. This allows the possibility of using a read-write lock. More...
|
|
typedef lock::any_order::all< M::lock_traits::api_type, M::lock_traits::model_type, M, M > | lock_all_type |
| The multi-lock type to use to ensured that operations on combined safe_collns are thread-safe. Note that locking them in any order reduces the likelihood of deadlock at the cost of performance. More...
|
|
typedef atomic_t::lock_traits | lock_traits |
|
typedef api_threading_traits< lock_traits::api_type, typename lock_traits::model_type > | thread_traits |
|
typedef container_type::reference | reference |
|
typedef container_type::const_reference | const_reference |
|
typedef container_type::size_type | size_type |
|
typedef container_type::value_type | value_type |
|
typedef lock_traits::exception_type | exception_type |
|
using | exit_requested_type = typename have_work_type::atomic_t |
|
|
constexpr | priority_queue () noexcept(true) FORCE_INLINE |
|
| priority_queue (typename base_t::have_work_type::atomic_t &a) noexcept(true) FORCE_INLINE |
|
void __fastcall | push_back (value_type const &v) noexcept(true) FORCE_INLINE |
|
void __fastcall | push_back (value_type &&v) noexcept(true) FORCE_INLINE |
|
value_type __fastcall | pop_front_1_nochk_nolk () noexcept(true) FORCE_INLINE |
|
value_ret_type __fastcall | pop_front_nochk_nolk () noexcept(true) FORCE_INLINE |
|
value_type __fastcall | pop_front_1_nochk_nosig () noexcept(true) FORCE_INLINE |
|
value_ret_type __fastcall | pop_front_nolk () noexcept(true) FORCE_INLINE |
|
value_ret_type __fastcall | pop_front () noexcept(true) FORCE_INLINE |
|
| BOOST_MPL_ASSERT ((std::is_same< typename write_lock_type::atomic_t, atomic_t >)) |
|
atomic_t &__fastcall | pop_lock () noexcept(true) FORCE_INLINE |
| A flag to atomically signal if the container contains work or not, how much work and the underlying lock, to assist in writing thread-safe code. More...
|
|
atomic_t &__fastcall | pop_lock () const noexcept(true) FORCE_INLINE |
| A flag to atomically signal if the container contains work or not, how much work and the underlying lock, to assist in writing thread-safe code. More...
|
|
atomic_t &__fastcall | push_lock () noexcept(true) FORCE_INLINE |
| A flag to atomically signal if the container contains work or not, how much work and the underlying lock, to assist in writing thread-safe code. More...
|
|
atomic_t &__fastcall | push_lock () const noexcept(true) FORCE_INLINE |
| A flag to atomically signal if the container contains work or not, and how much work and the underlying lock, to assist in writing thread-safe code. More...
|
|
__stdcall | safe_colln () noexcept(noexcept(container_type()) &&noexcept(have_work_type())) FORCE_INLINE |
|
| safe_colln (typename have_work_type::atomic_t &) FORCE_INLINE |
|
| safe_colln (std::initializer_list< value_type >) FORCE_INLINE |
|
__stdcall | safe_colln (size_type const sz, value_type const &v=value_type()) FORCE_INLINE |
|
__stdcall FORCE_INLINE | safe_colln (size_type const sz, T1 const &, T2 const &) |
|
__stdcall | safe_colln (const container_type &) FORCE_INLINE |
|
__stdcall | safe_colln (const safe_colln &) noexcept(false) FORCE_INLINE |
|
| safe_colln (size_type const sz, T1 const &, T2 const &) |
|
__stdcall | ~safe_colln () FORCE_INLINE |
|
safe_colln &__fastcall | operator= (const safe_colln &) noexcept(false) FORCE_INLINE |
|
bool __fastcall | empty () const noexcept(true) FORCE_INLINE |
|
size_type __fastcall | sync_size () const noexcept(false) FORCE_INLINE |
|
size_type __fastcall | size () const noexcept(true) FORCE_INLINE |
|
value_type __fastcall | operator[] (size_type s) const noexcept(false) FORCE_INLINE |
|
void __fastcall | push_back (value_type const &v) noexcept(false) FORCE_INLINE |
|
void __fastcall | push_back (value_type &&v) noexcept(false) FORCE_INLINE |
|
void __fastcall | push_front (const value_type &v) noexcept(false) FORCE_INLINE |
|
void __fastcall | push_front (value_type &&v) noexcept(false) FORCE_INLINE |
|
size_type __fastcall | erase (const value_type &v) noexcept(false) FORCE_INLINE |
|
void __fastcall | reserve (size_type sz) noexcept(false) FORCE_INLINE |
|
void __fastcall | clear () noexcept(false) FORCE_INLINE |
|
void __fastcall | swap (safe_colln &t) noexcept(false) FORCE_INLINE |
|
void __fastcall | resize_noinit_nolk (const size_type sz) noexcept(false) FORCE_INLINE |
| Resize the container to the requested size, but try to minimise (re-)initialising or deleting any of the existing elements. More...
|
|
void __fastcall | resize (const size_type sz) noexcept(false) FORCE_INLINE |
| Resize the container to the requested size. More...
|
|
bool __fastcall | operator== (safe_colln const &) const noexcept(true) FORCE_INLINE |
|
bool __fastcall FORCE_INLINE | operator== (safe_colln< C, M1, WL1, Sig1, MLk1 > const &) const noexcept(true) |
|
bool | operator== (safe_colln< C, M1, WL1, Sig1, MLk1 > const &sc) const noexcept(true) |
|
container_type const & | colln () const noexcept(true) FORCE_INLINE |
|
container_type & | colln () noexcept(true) FORCE_INLINE |
|
template<typename C, typename M, typename WL, class Sig, class ValRet = typename C::value_type>
class jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::priority_queue< C, M, WL, Sig, ValRet >
A thread-safety-assisted adaptor for a priority_queue.
The algorithmic complexities of the operations is based upon those of the input collection C. By default the adapted collection does not use a read-write lock. Note that if the read_lock_type and write_lock_types are the same, i.e. an exclusive lock were used, then the adaptor will exhibit EREW semantics. If a read-writer lock is used for them ,then it will exhibit CREW semantics.
- See also
- safe_colln
Definition at line 42 of file priority_queue.hpp.
template<typename C , typename M , typename WL , class Sig , class ValRet = typename C::value_type>
This is used to return a collection of items from the signalled_work_queue, in the order in which they were inserted. At least one item will be returned, and if there are sufficient items in the signalled_work_queue, then max_size items will be returned. This implies that the thread that extracts items from the queue does the work in batching them. This should only be used carefully! It isn't thread-safe!
- Returns
- A batch of either one or max_size items.
Definition at line 85 of file priority_queue.hpp.