#include <ConcurrentQueue.h>
Classes | |
struct | Block |
struct | ExplicitProducer |
struct | FreeList |
struct | FreeListNode |
struct | ImplicitProducer |
struct | ImplicitProducerHash |
struct | ImplicitProducerKVP |
struct | ProducerBase |
Public Types | |
typedef ::moodycamel::ConsumerToken | consumer_token_t |
typedef Traits::index_t | index_t |
typedef ::moodycamel::ProducerToken | producer_token_t |
typedef Traits::size_t | size_t |
Public Member Functions | |
ConcurrentQueue (size_t capacity=6 *BLOCK_SIZE) | |
ConcurrentQueue (size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers) | |
ConcurrentQueue (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION | |
ConcurrentQueue (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT | |
bool | enqueue (T const &item) |
bool | enqueue (T &&item) |
bool | enqueue (producer_token_t const &token, T const &item) |
bool | enqueue (producer_token_t const &token, T &&item) |
template<typename It > | |
bool | enqueue_bulk (It itemFirst, size_t count) |
template<typename It > | |
bool | enqueue_bulk (producer_token_t const &token, It itemFirst, size_t count) |
ConcurrentQueue & | operator= (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION |
ConcurrentQueue & | operator= (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT |
size_t | size_approx () const |
void | swap (ConcurrentQueue &other) MOODYCAMEL_NOEXCEPT |
template<typename U > | |
bool | try_dequeue (U &item) |
template<typename U > | |
bool | try_dequeue (consumer_token_t &token, U &item) |
template<typename It > | |
size_t | try_dequeue_bulk (It itemFirst, size_t max) |
template<typename It > | |
size_t | try_dequeue_bulk (consumer_token_t &token, It itemFirst, size_t max) |
template<typename It > | |
size_t | try_dequeue_bulk_from_producer (producer_token_t const &producer, It itemFirst, size_t max) |
template<typename U > | |
bool | try_dequeue_from_producer (producer_token_t const &producer, U &item) |
template<typename U > | |
bool | try_dequeue_non_interleaved (U &item) |
bool | try_enqueue (T const &item) |
bool | try_enqueue (T &&item) |
bool | try_enqueue (producer_token_t const &token, T const &item) |
bool | try_enqueue (producer_token_t const &token, T &&item) |
template<typename It > | |
bool | try_enqueue_bulk (It itemFirst, size_t count) |
template<typename It > | |
bool | try_enqueue_bulk (producer_token_t const &token, It itemFirst, size_t count) |
~ConcurrentQueue () | |
Static Public Member Functions | |
static bool | is_lock_free () |
Static Public Attributes | |
static const size_t | BLOCK_SIZE = static_cast<size_t>(Traits::BLOCK_SIZE) |
static const size_t | EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = static_cast<size_t>(Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) |
static const std::uint32_t | EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = static_cast<std::uint32_t>(Traits::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE) |
static const size_t | EXPLICIT_INITIAL_INDEX_SIZE = static_cast<size_t>(Traits::EXPLICIT_INITIAL_INDEX_SIZE) |
static const size_t | IMPLICIT_INITIAL_INDEX_SIZE = static_cast<size_t>(Traits::IMPLICIT_INITIAL_INDEX_SIZE) |
static const size_t | INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = static_cast<size_t>(Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE) |
static const size_t | MAX_SUBQUEUE_SIZE = (details::const_numeric_max<size_t>::value - static_cast<size_t>(Traits::MAX_SUBQUEUE_SIZE) < BLOCK_SIZE) ? details::const_numeric_max<size_t>::value : ((static_cast<size_t>(Traits::MAX_SUBQUEUE_SIZE) + (BLOCK_SIZE - 1)) / BLOCK_SIZE * BLOCK_SIZE) |
Private Types | |
enum | AllocationMode { CanAlloc, CannotAlloc } |
enum | InnerQueueContext { implicit_context = 0, explicit_context = 1 } |
Static Private Member Functions | |
template<typename U > | |
static U * | create () |
template<typename U , typename A1 > | |
static U * | create (A1 &&a1) |
template<typename U > | |
static U * | create_array (size_t count) |
template<typename U > | |
static void | destroy (U *p) |
template<typename U > | |
static void | destroy_array (U *p, size_t count) |
Private Attributes | |
FreeList< Block > | freeList |
std::atomic< std::uint32_t > | globalExplicitConsumerOffset |
std::atomic< ImplicitProducerHash * > | implicitProducerHash |
std::atomic< size_t > | implicitProducerHashCount |
std::atomic_flag | implicitProducerHashResizeInProgress |
Block * | initialBlockPool |
std::atomic< size_t > | initialBlockPoolIndex |
size_t | initialBlockPoolSize |
ImplicitProducerHash | initialImplicitProducerHash |
std::array< ImplicitProducerKVP, INITIAL_IMPLICIT_PRODUCER_HASH_SIZE > | initialImplicitProducerHashEntries |
std::atomic< std::uint32_t > | nextExplicitConsumerId |
std::atomic< std::uint32_t > | producerCount |
std::atomic< ProducerBase * > | producerListTail |
Friends | |
class | ConcurrentQueueTests |
struct | ConsumerToken |
struct | ExplicitProducer |
struct | ImplicitProducer |
template<typename XT , typename XTraits > | |
void | moodycamel::swap (typename ConcurrentQueue< XT, XTraits >::ImplicitProducerKVP &, typename ConcurrentQueue< XT, XTraits >::ImplicitProducerKVP &) MOODYCAMEL_NOEXCEPT |
struct | ProducerToken |
Definition at line 365 of file ConcurrentQueue.h.
typedef ::moodycamel::ConsumerToken moodycamel::ConcurrentQueue< T, Traits >::consumer_token_t |
Definition at line 699 of file ConcurrentQueue.h.
typedef Traits::index_t moodycamel::ConcurrentQueue< T, Traits >::index_t |
Definition at line 701 of file ConcurrentQueue.h.
typedef ::moodycamel::ProducerToken moodycamel::ConcurrentQueue< T, Traits >::producer_token_t |
Definition at line 698 of file ConcurrentQueue.h.
typedef Traits::size_t moodycamel::ConcurrentQueue< T, Traits >::size_t |
Definition at line 702 of file ConcurrentQueue.h.
|
private |
Enumerator | |
---|---|
CanAlloc | |
CannotAlloc |
Definition at line 1287 of file ConcurrentQueue.h.
|
private |
Enumerator | |
---|---|
implicit_context | |
explicit_context |
Definition at line 1485 of file ConcurrentQueue.h.
|
inlineexplicit |
Definition at line 741 of file ConcurrentQueue.h.
|
inline |
Definition at line 765 of file ConcurrentQueue.h.
|
inline |
Definition at line 786 of file ConcurrentQueue.h.
moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue | ( | ConcurrentQueue< T, Traits > const & | ) |
|
inline |
Definition at line 839 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 2989 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< T, Traits >::ImplicitProducer::dequeue().
|
inlineprivate |
Definition at line 2997 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3170 of file ConcurrentQueue.h.
|
inlinestaticprivate |
Definition at line 3531 of file ConcurrentQueue.h.
|
inlinestaticprivate |
Definition at line 3538 of file ConcurrentQueue.h.
|
inlinestaticprivate |
Definition at line 3504 of file ConcurrentQueue.h.
|
inlinestaticprivate |
Definition at line 3545 of file ConcurrentQueue.h.
|
inlinestaticprivate |
Definition at line 3519 of file ConcurrentQueue.h.
|
inline |
Definition at line 923 of file ConcurrentQueue.h.
|
inline |
Definition at line 934 of file ConcurrentQueue.h.
|
inline |
Definition at line 944 of file ConcurrentQueue.h.
|
inline |
Definition at line 953 of file ConcurrentQueue.h.
|
inline |
Definition at line 965 of file ConcurrentQueue.h.
|
inline |
Definition at line 978 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3306 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 1295 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 1301 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 1308 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 1314 of file ConcurrentQueue.h.
|
inlinestatic |
Definition at line 1266 of file ConcurrentQueue.h.
ConcurrentQueue& moodycamel::ConcurrentQueue< T, Traits >::operator= | ( | ConcurrentQueue< T, Traits > const & | ) |
|
inline |
Definition at line 873 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 2961 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3256 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3143 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3149 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3203 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().
|
inlineprivate |
Definition at line 3013 of file ConcurrentQueue.h.
|
inline |
Definition at line 1253 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::requisition_block().
|
inline |
Definition at line 883 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3271 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 889 of file ConcurrentQueue.h.
|
inline |
Definition at line 1053 of file ConcurrentQueue.h.
|
inline |
Definition at line 1111 of file ConcurrentQueue.h.
|
inline |
Definition at line 1159 of file ConcurrentQueue.h.
|
inline |
Definition at line 1177 of file ConcurrentQueue.h.
|
inline |
Definition at line 1241 of file ConcurrentQueue.h.
|
inline |
Definition at line 1228 of file ConcurrentQueue.h.
|
inline |
Definition at line 1096 of file ConcurrentQueue.h.
|
inline |
Definition at line 988 of file ConcurrentQueue.h.
|
inline |
Definition at line 999 of file ConcurrentQueue.h.
|
inline |
Definition at line 1008 of file ConcurrentQueue.h.
|
inline |
Definition at line 1016 of file ConcurrentQueue.h.
|
inline |
Definition at line 1029 of file ConcurrentQueue.h.
|
inline |
Definition at line 1041 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 3006 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 2978 of file ConcurrentQueue.h.
|
inlineprivate |
Definition at line 1320 of file ConcurrentQueue.h.
|
friend |
Definition at line 1285 of file ConcurrentQueue.h.
|
friend |
Definition at line 1280 of file ConcurrentQueue.h.
|
friend |
Definition at line 1281 of file ConcurrentQueue.h.
|
friend |
Definition at line 1283 of file ConcurrentQueue.h.
|
friend |
|
friend |
Definition at line 1279 of file ConcurrentQueue.h.
|
static |
Definition at line 704 of file ConcurrentQueue.h.
|
static |
Definition at line 705 of file ConcurrentQueue.h.
|
static |
Definition at line 709 of file ConcurrentQueue.h.
|
static |
Definition at line 706 of file ConcurrentQueue.h.
|
private |
Definition at line 3562 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::requisition_block(), and moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().
|
private |
Definition at line 3574 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().
|
static |
Definition at line 707 of file ConcurrentQueue.h.
|
private |
Definition at line 3567 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_implicit_producer_hashes().
|
private |
Definition at line 3568 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_implicit_producer_hashes().
|
private |
Definition at line 3571 of file ConcurrentQueue.h.
|
static |
Definition at line 708 of file ConcurrentQueue.h.
|
private |
Definition at line 3558 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().
|
private |
Definition at line 3557 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::requisition_block(), and moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().
|
private |
|
private |
Definition at line 3569 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_implicit_producer_hashes().
|
private |
Definition at line 3570 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_implicit_producer_hashes().
|
static |
Definition at line 715 of file ConcurrentQueue.h.
|
private |
Definition at line 3573 of file ConcurrentQueue.h.
Referenced by moodycamel::ConsumerToken::ConsumerToken(), and moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().
|
private |
Definition at line 3555 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().
|
private |
Definition at line 3554 of file ConcurrentQueue.h.
Referenced by moodycamel::ConcurrentQueue< carla::Buffer >::requisition_block(), and moodycamel::ConcurrentQueue< carla::Buffer >::swap_internal().