JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends
moodycamel::ConcurrentQueue< T, Traits > Class Template Reference

#include <concurrentqueue.h>

Inheritance diagram for moodycamel::ConcurrentQueue< T, Traits >:
[legend]

Public Types

typedef ::moodycamel::ProducerToken producer_token_t
 
typedef ::moodycamel::ConsumerToken consumer_token_t
 
typedef Traits::index_t index_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 (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION
 
ConcurrentQueueoperator= (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION
 
 ConcurrentQueue (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT
 
ConcurrentQueueoperator= (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT
 
void swap (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)
 
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)
 
template<typename U >
bool try_dequeue (U &item)
 
template<typename U >
bool try_dequeue_non_interleaved (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 U >
bool try_dequeue_from_producer (producer_token_t const &producer, U &item)
 
template<typename It >
size_t try_dequeue_bulk_from_producer (producer_token_t const &producer, It itemFirst, size_t max)
 
size_t size_approx () const
 

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 const size_t EXPLICIT_INITIAL_INDEX_SIZE
 
static const size_t IMPLICIT_INITIAL_INDEX_SIZE
 
static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE
 
static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE
 
static const size_t MAX_SUBQUEUE_SIZE
 

Friends

struct ProducerToken
 
struct ConsumerToken
 
struct ExplicitProducer
 
struct ImplicitProducer
 
class ConcurrentQueueTests
 
template<typename XT , typename XTraits >
void moodycamel::swap (typename ConcurrentQueue< XT, XTraits >::ImplicitProducerKVP &, typename ConcurrentQueue< XT, XTraits >::ImplicitProducerKVP &) MOODYCAMEL_NOEXCEPT
 

Member Typedef Documentation

◆ consumer_token_t

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
typedef ::moodycamel::ConsumerToken moodycamel::ConcurrentQueue< T, Traits >::consumer_token_t

◆ index_t

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
typedef Traits::index_t moodycamel::ConcurrentQueue< T, Traits >::index_t

◆ producer_token_t

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
typedef ::moodycamel::ProducerToken moodycamel::ConcurrentQueue< T, Traits >::producer_token_t

◆ size_t

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
typedef Traits::size_t moodycamel::ConcurrentQueue< T, Traits >::size_t

Constructor & Destructor Documentation

◆ ConcurrentQueue() [1/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue ( size_t  capacity = 6 * BLOCK_SIZE)
inlineexplicit

◆ ConcurrentQueue() [2/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue ( size_t  minCapacity,
size_t  maxExplicitProducers,
size_t  maxImplicitProducers 
)
inline

◆ ~ConcurrentQueue()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
moodycamel::ConcurrentQueue< T, Traits >::~ConcurrentQueue ( )
inline

◆ ConcurrentQueue() [3/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue ( ConcurrentQueue< T, Traits > const &  )

◆ ConcurrentQueue() [4/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue ( ConcurrentQueue< T, Traits > &&  other)
inline

Member Function Documentation

◆ enqueue() [1/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::enqueue ( producer_token_t const &  token,
T &&  item 
)
inline

◆ enqueue() [2/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::enqueue ( producer_token_t const &  token,
T const &  item 
)
inline

◆ enqueue() [3/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::enqueue ( T &&  item)
inline

◆ enqueue() [4/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::enqueue ( T const &  item)
inline
Here is the caller graph for this function:

◆ enqueue_bulk() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename It >
bool moodycamel::ConcurrentQueue< T, Traits >::enqueue_bulk ( It  itemFirst,
size_t  count 
)
inline
Here is the caller graph for this function:

◆ enqueue_bulk() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename It >
bool moodycamel::ConcurrentQueue< T, Traits >::enqueue_bulk ( producer_token_t const &  token,
It  itemFirst,
size_t  count 
)
inline

◆ is_lock_free()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
static bool moodycamel::ConcurrentQueue< T, Traits >::is_lock_free ( )
inlinestatic
Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
ConcurrentQueue& moodycamel::ConcurrentQueue< T, Traits >::operator= ( ConcurrentQueue< T, Traits > &&  other)
inline

◆ operator=() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
ConcurrentQueue& moodycamel::ConcurrentQueue< T, Traits >::operator= ( ConcurrentQueue< T, Traits > const &  )

◆ size_approx()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
size_t moodycamel::ConcurrentQueue< T, Traits >::size_approx ( ) const
inline

◆ swap()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
void moodycamel::ConcurrentQueue< T, Traits >::swap ( ConcurrentQueue< T, Traits > &  other)
inline

◆ try_dequeue() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
bool moodycamel::ConcurrentQueue< T, Traits >::try_dequeue ( consumer_token_t token,
U &  item 
)
inline

◆ try_dequeue() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
bool moodycamel::ConcurrentQueue< T, Traits >::try_dequeue ( U &  item)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_dequeue_bulk() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename It >
size_t moodycamel::ConcurrentQueue< T, Traits >::try_dequeue_bulk ( consumer_token_t token,
It  itemFirst,
size_t  max 
)
inline

◆ try_dequeue_bulk() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename It >
size_t moodycamel::ConcurrentQueue< T, Traits >::try_dequeue_bulk ( It  itemFirst,
size_t  max 
)
inline
Here is the caller graph for this function:

◆ try_dequeue_bulk_from_producer()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename It >
size_t moodycamel::ConcurrentQueue< T, Traits >::try_dequeue_bulk_from_producer ( producer_token_t const &  producer,
It  itemFirst,
size_t  max 
)
inline

◆ try_dequeue_from_producer()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
bool moodycamel::ConcurrentQueue< T, Traits >::try_dequeue_from_producer ( producer_token_t const &  producer,
U &  item 
)
inline
Here is the caller graph for this function:

◆ try_dequeue_non_interleaved()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
bool moodycamel::ConcurrentQueue< T, Traits >::try_dequeue_non_interleaved ( U &  item)
inline

◆ try_enqueue() [1/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::try_enqueue ( producer_token_t const &  token,
T &&  item 
)
inline

◆ try_enqueue() [2/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::try_enqueue ( producer_token_t const &  token,
T const &  item 
)
inline

◆ try_enqueue() [3/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::try_enqueue ( T &&  item)
inline

◆ try_enqueue() [4/4]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::try_enqueue ( T const &  item)
inline
Here is the caller graph for this function:

◆ try_enqueue_bulk() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename It >
bool moodycamel::ConcurrentQueue< T, Traits >::try_enqueue_bulk ( It  itemFirst,
size_t  count 
)
inline
Here is the caller graph for this function:

◆ try_enqueue_bulk() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename It >
bool moodycamel::ConcurrentQueue< T, Traits >::try_enqueue_bulk ( producer_token_t const &  token,
It  itemFirst,
size_t  count 
)
inline

Friends And Related Function Documentation

◆ ConcurrentQueueTests

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
friend class ConcurrentQueueTests
friend

◆ ConsumerToken

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
friend struct ConsumerToken
friend

◆ ExplicitProducer

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
friend struct ExplicitProducer
friend

◆ ImplicitProducer

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
friend struct ImplicitProducer
friend

◆ moodycamel::swap

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename XT , typename XTraits >
void moodycamel::swap ( typename ConcurrentQueue< XT, XTraits >::ImplicitProducerKVP &  ,
typename ConcurrentQueue< XT, XTraits >::ImplicitProducerKVP &   
)
friend

◆ ProducerToken

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
friend struct ProducerToken
friend

Field Documentation

◆ BLOCK_SIZE

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const size_t moodycamel::ConcurrentQueue< T, Traits >::BLOCK_SIZE = static_cast<size_t>(Traits::BLOCK_SIZE)
static

◆ EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const size_t moodycamel::ConcurrentQueue< T, Traits >::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD
static
Initial value:
=
static_cast<size_t>(Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD)

◆ EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const std::uint32_t moodycamel::ConcurrentQueue< T, Traits >::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE
static
Initial value:
=
static_cast<std::uint32_t>(
Traits::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE)

◆ EXPLICIT_INITIAL_INDEX_SIZE

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const size_t moodycamel::ConcurrentQueue< T, Traits >::EXPLICIT_INITIAL_INDEX_SIZE
static
Initial value:
=
static_cast<size_t>(Traits::EXPLICIT_INITIAL_INDEX_SIZE)

◆ IMPLICIT_INITIAL_INDEX_SIZE

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const size_t moodycamel::ConcurrentQueue< T, Traits >::IMPLICIT_INITIAL_INDEX_SIZE
static
Initial value:
=
static_cast<size_t>(Traits::IMPLICIT_INITIAL_INDEX_SIZE)

◆ INITIAL_IMPLICIT_PRODUCER_HASH_SIZE

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const size_t moodycamel::ConcurrentQueue< T, Traits >::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE
static
Initial value:
=
static_cast<size_t>(Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE)

◆ MAX_SUBQUEUE_SIZE

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const size_t moodycamel::ConcurrentQueue< T, Traits >::MAX_SUBQUEUE_SIZE
static
Initial value:
=
static_cast<size_t>(Traits::MAX_SUBQUEUE_SIZE) <
: ((static_cast<size_t>(Traits::MAX_SUBQUEUE_SIZE) +
(BLOCK_SIZE - 1)) /
static const size_t BLOCK_SIZE
Definition: concurrentqueue.h:810
static const T value
Definition: concurrentqueue.h:318

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