libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
An adaptor for collections that batches up to I items being atomically removed from the collection, Colln. More...
#include <batch.hpp>
Public Types | |
typedef Colln | base_t |
typedef base_t::thread_traits | thread_traits |
typedef Colln | container_type |
typedef container_type::value_ret_type | value_ret_type |
typedef container_type::exception_type | exeception_type |
Public Member Functions | |
constexpr | front_batch () noexcept(noexcept(base_t())) |
front_batch (typename base_t::have_work_type::atomic_t &a) noexcept(noexcept(base_t(std::declval< base_t >()))) | |
front_batch (front_batch const &fb) noexcept(noexcept(base_t(std::declval< front_batch >()))) | |
front_batch &__fastcall FORCE_INLINE | operator= (front_batch const &fb) noexcept(noexcept(base_t::operator=(std::declval< front_batch >()))) |
value_ret_type __fastcall | pop_front_nochk_nolk () noexcept(true) FORCE_INLINE |
The items are batched when popped from the queue. More... | |
Static Public Attributes | |
static constexpr unsigned long | max_size =I |
The maximum number of items to batch. More... | |
An adaptor for collections that batches up to I items being atomically removed from the collection, Colln.
This means that as items are removed from the collection, they are potentially added to the last item that was removed from the collection. This implies that the Colln::value_type is some kind of collection to which that work may be added.
typedef Colln jmmcg::LIBJMMCG_VER_NAMESPACE::front_batch< Colln, I >::base_t |
typedef Colln jmmcg::LIBJMMCG_VER_NAMESPACE::front_batch< Colln, I >::container_type |
typedef container_type::exception_type jmmcg::LIBJMMCG_VER_NAMESPACE::front_batch< Colln, I >::exeception_type |
typedef base_t::thread_traits jmmcg::LIBJMMCG_VER_NAMESPACE::front_batch< Colln, I >::thread_traits |
typedef container_type::value_ret_type jmmcg::LIBJMMCG_VER_NAMESPACE::front_batch< Colln, I >::value_ret_type |
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
The items are batched when popped from the queue.
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.
Definition at line 23 of file batch_impl.hpp.
References jmmcg::LIBJMMCG_VER_NAMESPACE::front_batch< Colln, I >::max_size.
|
staticconstexpr |
The maximum number of items to batch.
Definition at line 34 of file batch.hpp.
Referenced by jmmcg::LIBJMMCG_VER_NAMESPACE::front_batch< Colln, I >::pop_front_nochk_nolk().