Navigation
API > API/Runtime > API/Runtime/Core
Fast multi-producer/single-consumer unbounded concurrent queue. Based on http://www.1024cores.net/home/lock-free-algorithms/queues/non-intrusive-mpsc-node-based-queue
| Name | TMpscQueue |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/MpscQueue.h |
| Include Path | #include "Containers/MpscQueue.h" |
Syntax
template<typename T, typename AllocatorType>
class TMpscQueue
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMpscQueue () |
Containers/MpscQueue.h | ||
TMpscQueue
(
TMpscQueue&& |
Containers/MpscQueue.h | ||
TMpscQueue
(
const TMpscQueue& |
Containers/MpscQueue.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TMpscQueue() |
Containers/MpscQueue.h |
Structs
| Name | Remarks |
|---|---|
| FNode |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | T | Containers/MpscQueue.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Head | std::atomic< FNode * > | Containers/MpscQueue.h | ||
| Tail | FNode * | Alignas(PLATFORM_CACHE_LINE_SIZE) | Containers/MpscQueue.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Containers/MpscQueue.h | |||
bool Dequeue
(
ElementType& OutElem |
Containers/MpscQueue.h | ||
void Enqueue
(
ArgTypes&&... Args |
Containers/MpscQueue.h | ||
bool IsEmpty() |
Containers/MpscQueue.h | ||
ElementType * Peek () |
As there can be only one consumer, a consumer can safely "peek" the tail of the queue. | Containers/MpscQueue.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMpscQueue & operator=
(
const TMpscQueue& |
Containers/MpscQueue.h | ||
TMpscQueue & operator=
(
TMpscQueue&& |
Containers/MpscQueue.h |