CARLA
 
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | 静态 Public 成员函数 | 静态 Public 属性 | Private 类型 | Private 成员函数 | 静态 Private 成员函数 | Private 属性 | 友元 | 所有成员列表
moodycamel::ConcurrentQueue< T, Traits > 模板类 参考

#include <ConcurrentQueue.h>

+ 类 moodycamel::ConcurrentQueue< T, Traits > 继承关系图:
+ moodycamel::ConcurrentQueue< T, Traits > 的协作图:

struct  Block
 
struct  ExplicitProducer
 
struct  FreeList
 
struct  FreeListNode
 
struct  ImplicitProducer
 
struct  ImplicitProducerHash
 
struct  ImplicitProducerKVP
 
struct  ProducerBase
 

Public 类型

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 成员函数

 ConcurrentQueue (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT
 
 ConcurrentQueue (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION
 
 ConcurrentQueue (size_t capacity=6 *BLOCK_SIZE)
 
 ConcurrentQueue (size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers)
 
bool enqueue (producer_token_t const &token, T &&item)
 
bool enqueue (producer_token_t const &token, T const &item)
 
bool enqueue (T &&item)
 
bool enqueue (T const &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)
 
ConcurrentQueueoperator= (ConcurrentQueue &&other) MOODYCAMEL_NOEXCEPT
 
ConcurrentQueueoperator= (ConcurrentQueue const &) MOODYCAMEL_DELETE_FUNCTION
 
size_t size_approx () const
 
void swap (ConcurrentQueue &other) MOODYCAMEL_NOEXCEPT
 
template<typename U >
bool try_dequeue (consumer_token_t &token, U &item)
 
template<typename U >
bool try_dequeue (U &item)
 
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 (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 (producer_token_t const &token, T &&item)
 
bool try_enqueue (producer_token_t const &token, T const &item)
 
bool try_enqueue (T &&item)
 
bool try_enqueue (T const &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 ()
 

静态 Public 成员函数

static bool is_lock_free ()
 

静态 Public 属性

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 类型

enum  AllocationMode { CanAlloc , CannotAlloc }
 
enum  InnerQueueContext { implicit_context = 0 , explicit_context = 1 }
 

Private 成员函数

void add_block_to_free_list (Block *block)
 
void add_blocks_to_free_list (Block *block)
 
ProducerBaseadd_producer (ProducerBase *producer)
 
ImplicitProducerget_or_add_implicit_producer ()
 
template<AllocationMode canAlloc, typename U >
bool inner_enqueue (producer_token_t const &token, U &&element)
 
template<AllocationMode canAlloc, typename U >
bool inner_enqueue (U &&element)
 
template<AllocationMode canAlloc, typename It >
bool inner_enqueue_bulk (It itemFirst, size_t count)
 
template<AllocationMode canAlloc, typename It >
bool inner_enqueue_bulk (producer_token_t const &token, It itemFirst, size_t count)
 
void populate_initial_block_list (size_t blockCount)
 
void populate_initial_implicit_producer_hash ()
 
ProducerBaserecycle_or_create_producer (bool isExplicit)
 
ProducerBaserecycle_or_create_producer (bool isExplicit, bool &recycled)
 
void reown_producers ()
 
template<AllocationMode canAlloc>
Blockrequisition_block ()
 
void swap_implicit_producer_hashes (ConcurrentQueue &other)
 
ConcurrentQueueswap_internal (ConcurrentQueue &other)
 
Blocktry_get_block_from_free_list ()
 
Blocktry_get_block_from_initial_pool ()
 
bool update_current_producer_after_rotation (consumer_token_t &token)
 

静态 Private 成员函数

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 属性

FreeList< BlockfreeList
 
std::atomic< std::uint32_t > globalExplicitConsumerOffset
 
std::atomic< ImplicitProducerHash * > implicitProducerHash
 
std::atomic< size_timplicitProducerHashCount
 
std::atomic_flag implicitProducerHashResizeInProgress
 
BlockinitialBlockPool
 
std::atomic< size_tinitialBlockPoolIndex
 
size_t initialBlockPoolSize
 
ImplicitProducerHash initialImplicitProducerHash
 
std::array< ImplicitProducerKVP, INITIAL_IMPLICIT_PRODUCER_HASH_SIZEinitialImplicitProducerHashEntries
 
std::atomic< std::uint32_t > nextExplicitConsumerId
 
std::atomic< std::uint32_t > producerCount
 
std::atomic< ProducerBase * > producerListTail
 

友元

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
 

详细描述

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

在文件 ConcurrentQueue.h695 行定义.

成员类型定义说明

◆ consumer_token_t

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

在文件 ConcurrentQueue.h699 行定义.

◆ index_t

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

在文件 ConcurrentQueue.h701 行定义.

◆ producer_token_t

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

在文件 ConcurrentQueue.h698 行定义.

◆ size_t

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

在文件 ConcurrentQueue.h702 行定义.

成员枚举类型说明

◆ AllocationMode

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
enum moodycamel::ConcurrentQueue::AllocationMode
private
枚举值
CanAlloc 
CannotAlloc 

在文件 ConcurrentQueue.h1287 行定义.

◆ InnerQueueContext

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
enum moodycamel::ConcurrentQueue::InnerQueueContext
private
枚举值
implicit_context 
explicit_context 

在文件 ConcurrentQueue.h1485 行定义.

构造及析构函数说明

◆ 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

成员函数说明

◆ add_block_to_free_list()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
void moodycamel::ConcurrentQueue< T, Traits >::add_block_to_free_list ( Block * block)
inlineprivate

◆ add_blocks_to_free_list()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
void moodycamel::ConcurrentQueue< T, Traits >::add_blocks_to_free_list ( Block * block)
inlineprivate

在文件 ConcurrentQueue.h2997 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::add_block_to_free_list() , 以及 moodycamel::ConcurrentQueue< T, Traits >::Block::next.

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::ImplicitProducer::enqueue_bulk().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ add_producer()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
ProducerBase * moodycamel::ConcurrentQueue< T, Traits >::add_producer ( ProducerBase * producer)
inlineprivate

◆ create() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
static U * moodycamel::ConcurrentQueue< T, Traits >::create ( )
inlinestaticprivate

在文件 ConcurrentQueue.h3531 行定义.

◆ create() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U , typename A1 >
static U * moodycamel::ConcurrentQueue< T, Traits >::create ( A1 && a1)
inlinestaticprivate

在文件 ConcurrentQueue.h3538 行定义.

◆ create_array()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
static U * moodycamel::ConcurrentQueue< T, Traits >::create_array ( size_t count)
inlinestaticprivate

在文件 ConcurrentQueue.h3504 行定义.

◆ destroy()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
static void moodycamel::ConcurrentQueue< T, Traits >::destroy ( U * p)
inlinestaticprivate

在文件 ConcurrentQueue.h3545 行定义.

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::~ConcurrentQueue() , 以及 moodycamel::ConcurrentQueue< T, Traits >::ExplicitProducer::~ExplicitProducer().

+ 这是这个函数的调用关系图:

◆ destroy_array()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<typename U >
static void moodycamel::ConcurrentQueue< T, Traits >::destroy_array ( U * p,
size_t count )
inlinestaticprivate

在文件 ConcurrentQueue.h3519 行定义.

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::~ConcurrentQueue().

+ 这是这个函数的调用关系图:

◆ enqueue() [1/4]

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

在文件 ConcurrentQueue.h953 行定义.

◆ enqueue() [2/4]

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

在文件 ConcurrentQueue.h944 行定义.

◆ 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

◆ 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

◆ 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

在文件 ConcurrentQueue.h978 行定义.

◆ get_or_add_implicit_producer()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
ImplicitProducer * moodycamel::ConcurrentQueue< T, Traits >::get_or_add_implicit_producer ( )
inlineprivate

◆ inner_enqueue() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<AllocationMode canAlloc, typename U >
bool moodycamel::ConcurrentQueue< T, Traits >::inner_enqueue ( producer_token_t const & token,
U && element )
inlineprivate

在文件 ConcurrentQueue.h1295 行定义.

引用了 moodycamel::ProducerToken::producer.

◆ inner_enqueue() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<AllocationMode canAlloc, typename U >
bool moodycamel::ConcurrentQueue< T, Traits >::inner_enqueue ( U && element)
inlineprivate

在文件 ConcurrentQueue.h1301 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::get_or_add_implicit_producer().

+ 函数调用图:

◆ inner_enqueue_bulk() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<AllocationMode canAlloc, typename It >
bool moodycamel::ConcurrentQueue< T, Traits >::inner_enqueue_bulk ( It itemFirst,
size_t count )
inlineprivate

在文件 ConcurrentQueue.h1314 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::get_or_add_implicit_producer().

+ 函数调用图:

◆ inner_enqueue_bulk() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<AllocationMode canAlloc, typename It >
bool moodycamel::ConcurrentQueue< T, Traits >::inner_enqueue_bulk ( producer_token_t const & token,
It itemFirst,
size_t count )
inlineprivate

在文件 ConcurrentQueue.h1308 行定义.

引用了 moodycamel::ProducerToken::producer.

◆ is_lock_free()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
static bool moodycamel::ConcurrentQueue< T, Traits >::is_lock_free ( )
inlinestatic

在文件 ConcurrentQueue.h1266 行定义.

◆ operator=() [1/2]

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

在文件 ConcurrentQueue.h873 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::swap_internal().

+ 函数调用图:

◆ operator=() [2/2]

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

◆ populate_initial_block_list()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
void moodycamel::ConcurrentQueue< T, Traits >::populate_initial_block_list ( size_t blockCount)
inlineprivate

在文件 ConcurrentQueue.h2961 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::Block::dynamicallyAllocated, moodycamel::ConcurrentQueue< T, Traits >::initialBlockPool , 以及 moodycamel::ConcurrentQueue< T, Traits >::initialBlockPoolSize.

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue() , 以及 moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue().

+ 这是这个函数的调用关系图:

◆ populate_initial_implicit_producer_hash()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
void moodycamel::ConcurrentQueue< T, Traits >::populate_initial_implicit_producer_hash ( )
inlineprivate

◆ recycle_or_create_producer() [1/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
ProducerBase * moodycamel::ConcurrentQueue< T, Traits >::recycle_or_create_producer ( bool isExplicit)
inlineprivate

在文件 ConcurrentQueue.h3143 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::recycle_or_create_producer().

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::get_or_add_implicit_producer() , 以及 moodycamel::ConcurrentQueue< T, Traits >::recycle_or_create_producer().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ recycle_or_create_producer() [2/2]

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
ProducerBase * moodycamel::ConcurrentQueue< T, Traits >::recycle_or_create_producer ( bool isExplicit,
bool & recycled )
inlineprivate

在文件 ConcurrentQueue.h3149 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::add_producer() , 以及 moodycamel::ConcurrentQueue< T, Traits >::producerListTail.

+ 函数调用图:

◆ reown_producers()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
void moodycamel::ConcurrentQueue< T, Traits >::reown_producers ( )
inlineprivate

在文件 ConcurrentQueue.h3203 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::producerListTail.

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::ConcurrentQueue() , 以及 moodycamel::ConcurrentQueue< T, Traits >::swap_internal().

+ 这是这个函数的调用关系图:

◆ requisition_block()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
template<AllocationMode canAlloc>
Block * moodycamel::ConcurrentQueue< T, Traits >::requisition_block ( )
inlineprivate

在文件 ConcurrentQueue.h3013 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::CanAlloc, moodycamel::ConcurrentQueue< T, Traits >::try_get_block_from_free_list() , 以及 moodycamel::ConcurrentQueue< T, Traits >::try_get_block_from_initial_pool().

+ 函数调用图:

◆ 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

在文件 ConcurrentQueue.h883 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::swap_internal().

被这些函数引用 moodycamel::swap().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ swap_implicit_producer_hashes()

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

◆ swap_internal()

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

◆ 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

在文件 ConcurrentQueue.h1053 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::ProducerBase::dequeue(), moodycamel::details::likely(), moodycamel::ConcurrentQueue< T, Traits >::producerListTail , 以及 moodycamel::ConcurrentQueue< T, Traits >::ProducerBase::size_approx().

+ 函数调用图:

◆ 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

◆ 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

在文件 ConcurrentQueue.h1241 行定义.

引用了 moodycamel::ProducerToken::producer.

◆ 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

在文件 ConcurrentQueue.h1228 行定义.

引用了 moodycamel::ProducerToken::producer.

◆ 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

在文件 ConcurrentQueue.h1016 行定义.

◆ 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

在文件 ConcurrentQueue.h1008 行定义.

◆ 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

◆ 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

◆ 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

在文件 ConcurrentQueue.h1041 行定义.

◆ try_get_block_from_free_list()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
Block * moodycamel::ConcurrentQueue< T, Traits >::try_get_block_from_free_list ( )
inlineprivate

在文件 ConcurrentQueue.h3006 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::freeList.

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::requisition_block().

+ 这是这个函数的调用关系图:

◆ try_get_block_from_initial_pool()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
Block * moodycamel::ConcurrentQueue< T, Traits >::try_get_block_from_initial_pool ( )
inlineprivate

在文件 ConcurrentQueue.h2978 行定义.

引用了 moodycamel::ConcurrentQueue< T, Traits >::initialBlockPool, moodycamel::ConcurrentQueue< T, Traits >::initialBlockPoolIndex , 以及 moodycamel::ConcurrentQueue< T, Traits >::initialBlockPoolSize.

被这些函数引用 moodycamel::ConcurrentQueue< T, Traits >::requisition_block().

+ 这是这个函数的调用关系图:

◆ update_current_producer_after_rotation()

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
bool moodycamel::ConcurrentQueue< T, Traits >::update_current_producer_after_rotation ( consumer_token_t & token)
inlineprivate

友元及相关函数文档

◆ ConcurrentQueueTests

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

在文件 ConcurrentQueue.h1285 行定义.

◆ ConsumerToken

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

在文件 ConcurrentQueue.h1280 行定义.

◆ ExplicitProducer

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

在文件 ConcurrentQueue.h1282 行定义.

◆ ImplicitProducer

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

在文件 ConcurrentQueue.h1284 行定义.

◆ 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

在文件 ConcurrentQueue.h1279 行定义.

类成员变量说明

◆ 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_cast<size_t>(Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD)
static

◆ 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_cast<std::uint32_t>(Traits::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE)
static

◆ EXPLICIT_INITIAL_INDEX_SIZE

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

在文件 ConcurrentQueue.h706 行定义.

◆ freeList

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
FreeList<Block> moodycamel::ConcurrentQueue< T, Traits >::freeList
private

◆ globalExplicitConsumerOffset

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic<std::uint32_t> moodycamel::ConcurrentQueue< T, Traits >::globalExplicitConsumerOffset
private

◆ IMPLICIT_INITIAL_INDEX_SIZE

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

在文件 ConcurrentQueue.h707 行定义.

◆ implicitProducerHash

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic<ImplicitProducerHash*> moodycamel::ConcurrentQueue< T, Traits >::implicitProducerHash
private

◆ implicitProducerHashCount

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic<size_t> moodycamel::ConcurrentQueue< T, Traits >::implicitProducerHashCount
private

◆ implicitProducerHashResizeInProgress

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic_flag moodycamel::ConcurrentQueue< T, Traits >::implicitProducerHashResizeInProgress
private

◆ INITIAL_IMPLICIT_PRODUCER_HASH_SIZE

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

◆ initialBlockPool

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
Block* moodycamel::ConcurrentQueue< T, Traits >::initialBlockPool
private

◆ initialBlockPoolIndex

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic<size_t> moodycamel::ConcurrentQueue< T, Traits >::initialBlockPoolIndex
private

◆ initialBlockPoolSize

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

◆ initialImplicitProducerHash

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
ImplicitProducerHash moodycamel::ConcurrentQueue< T, Traits >::initialImplicitProducerHash
private

◆ initialImplicitProducerHashEntries

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::array<ImplicitProducerKVP, INITIAL_IMPLICIT_PRODUCER_HASH_SIZE> moodycamel::ConcurrentQueue< T, Traits >::initialImplicitProducerHashEntries
private

◆ MAX_SUBQUEUE_SIZE

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
const size_t moodycamel::ConcurrentQueue< T, Traits >::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)
static

◆ nextExplicitConsumerId

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic<std::uint32_t> moodycamel::ConcurrentQueue< T, Traits >::nextExplicitConsumerId
private

◆ producerCount

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic<std::uint32_t> moodycamel::ConcurrentQueue< T, Traits >::producerCount
private

◆ producerListTail

template<typename T , typename Traits = ConcurrentQueueDefaultTraits>
std::atomic<ProducerBase*> moodycamel::ConcurrentQueue< T, Traits >::producerListTail
private

该类的文档由以下文件生成: