C/C++ API Reference
Loading...
Searching...
No Matches
pw::BasicInlineAsyncQueue< ValueType, SizeType, kCapacity > Class Template Reference

Overview

template<typename ValueType, typename SizeType, size_t kCapacity = containers::internal::kGenericSized>
class pw::BasicInlineAsyncQueue< ValueType, SizeType, kCapacity >

BasicInlineAsyncQueue adds async PendHasSpace and PendNotEmpty methods to BasicInlineQueue.

BasicInlineAsyncQueue allows specifying the size_type. Larger size_types allow for larger queues, but they slightly increase the object's size. Users should typically reach for pw::InlineAsyncQueue, which uses a size_type of uint16_t.

Warning
BasicInlineAsyncQueue is NOT thread safe. External synchronization is required to share a BasicInlineAsyncQueue between threads.

Public Member Functions

 BasicInlineAsyncQueue (size_type count, const_reference value)
 
 BasicInlineAsyncQueue (size_type count)
 
template<typename InputIterator , typename = containers::internal::EnableIfInputIterator<InputIterator>>
 BasicInlineAsyncQueue (InputIterator start, InputIterator finish)
 
 BasicInlineAsyncQueue (const std::initializer_list< value_type > &list)
 
 BasicInlineAsyncQueue (const BasicInlineAsyncQueue &other)
 Copy constructs for matching capacity.
 
template<size_t kOtherCapacity>
 BasicInlineAsyncQueue (const BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &other)
 
 BasicInlineAsyncQueue (BasicInlineAsyncQueue &&other)
 Move constructs for matching capacity.
 
template<size_t kOtherCapacity>
 BasicInlineAsyncQueue (BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &&other)
 
BasicInlineAsyncQueueoperator= (const std::initializer_list< value_type > &list)
 
BasicInlineAsyncQueueoperator= (const BasicInlineAsyncQueue &other)
 Copy assigns from matching capacity.
 
template<size_t kOtherCapacity>
BasicInlineAsyncQueueoperator= (const BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &other)
 
BasicInlineAsyncQueueoperator= (BasicInlineAsyncQueue &&other)
 Move assigns from matching capacity.
 
template<size_t kOtherCapacity>
BasicInlineAsyncQueueoperator= (BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &&other)
 
template<typename OtherValueType , typename = containers::internal::EnableIfIterable<OtherValueType>>
BasicInlineAsyncQueueoperator= (const OtherValueType &other)
 
async2::Poll PendHasSpace (async2::Context &context, size_type num=1)
 Returns pw::async2::Pending until space for num elements is available.
 
async2::Poll PendNotEmpty (async2::Context &context)
 Returns pw::async2::Pending until an element is available.
 

Static Public Member Functions

static constexpr size_type max_size ()
 
static constexpr size_type capacity ()
 

Friends

class BasicInlineAsyncQueue< ValueType, SizeType, containers::internal::kGenericSized >
 

Constructor & Destructor Documentation

◆ BasicInlineAsyncQueue() [1/2]

template<typename ValueType , typename SizeType , size_t kCapacity = containers::internal::kGenericSized>
template<size_t kOtherCapacity>
pw::BasicInlineAsyncQueue< ValueType, SizeType, kCapacity >::BasicInlineAsyncQueue ( const BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &  other)
inline

Copy constructs for mismatched capacity.

Note that this will result in a crash if kOtherCapacity < size().

◆ BasicInlineAsyncQueue() [2/2]

template<typename ValueType , typename SizeType , size_t kCapacity = containers::internal::kGenericSized>
template<size_t kOtherCapacity>
pw::BasicInlineAsyncQueue< ValueType, SizeType, kCapacity >::BasicInlineAsyncQueue ( BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &&  other)
inline

Move constructs for mismatched capacity.

Note that this will result in a crash if kOtherCapacity < size().

Member Function Documentation

◆ operator=() [1/2]

template<typename ValueType , typename SizeType , size_t kCapacity = containers::internal::kGenericSized>
template<size_t kOtherCapacity>
BasicInlineAsyncQueue & pw::BasicInlineAsyncQueue< ValueType, SizeType, kCapacity >::operator= ( BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &&  other)
inline

Move assigns from mismatched capacity.

Note that this will result in a crash if kOtherCapacity < size().

◆ operator=() [2/2]

template<typename ValueType , typename SizeType , size_t kCapacity = containers::internal::kGenericSized>
template<size_t kOtherCapacity>
BasicInlineAsyncQueue & pw::BasicInlineAsyncQueue< ValueType, SizeType, kCapacity >::operator= ( const BasicInlineAsyncQueue< ValueType, SizeType, kOtherCapacity > &  other)
inline

Copy assigns from mismatched capacity.

Note that this will result in a crash if other.size() > capacity().


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