Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Containers
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Containers/ConsumeAllMpmcQueue.h |
| Include | #include "Containers/ConsumeAllMpmcQueue.h" |
Syntax
template<typename T, typename AllocatorType>
class TConsumeAllMpmcQueue
Remarks
Multi-producer/multi-consumer unbounded concurrent queue (implemented as a Stack) that is atomically consumed and is reset to its default empty state. Validated and run though atomic race detector.
Constructors
| Type | Name | Description | |
|---|---|---|---|
TConsumeAllMpmcQueue
(
const TConsumeAllMpmcQueue& |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| EConsumeAllMpmcQueueResult | ConsumeAllFifo
(
const F& Consumer |
Take all items off the Queue atomically and consumes them in FIFO order at the cost of the reversing the Links once returns EConsumeAllMpmcQueueResult::WasEmpty if the Queue was empty or EConsumeAllMpmcQueueResult::HadItems if there were items to consume | |
| EConsumeAllMpmcQueueResult | ConsumeAllLifo
(
const F& Consumer |
Take all items off the Queue atomically and consumes them in LIFO order returns EConsumeAllMpmcQueueResult::WasEmpty if the Queue was empty or EConsumeAllMpmcQueueResult::HadItems if there were items to consume | |
| bool | IsEmpty () |
The result can be relied upon only in special cases (e.g. debug checks), as the state can change concurrently. use with caution | |
| EConsumeAllMpmcQueueResult | ProduceItem
(
ArgTypes&&... Args |
Push an Item to the Queue and returns EConsumeAllMpmcQueueResult::WasEmpty if the Queue was empty before or EConsumeAllMpmcQueueResult::HadItems if there were already items in it |
Operators
| Type | Name | Description | |
|---|---|---|---|
| TConsumeAllMpmcQueue & | operator=
(
const TConsumeAllMpmcQueue& |
||
| TConsumeAllMpmcQueue & |