TSpscQueue

Fast single-producer/single-consumer unbounded concurrent queue.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/SpscQueue.h

Include

#include "Containers/SpscQueue.h"

Syntax

template<typename T>
class TSpscQueue

Remarks

Fast single-producer/single-consumer unbounded concurrent queue. Doesn't free memory until destruction but recycles consumed items. Based on http://www.1024cores.net/home/lock-free-algorithms/queues/unbounded-spsc-queue

Constructors

Name Description

Public function

TSpscQueue()

Public function

TSpscQueue

(
    TSpscQueue&&
)

Public function

TSpscQueue

(
    const TSpscQueue&
)

Destructors

Name Description

Public function

~TSpscQueue()

Functions

Name Description

Public function

TOptional< E...

 

Dequeue()

Returns empty TOptional if queue is empty

Public function

void

 

Enqueue

(
    ArgTypes&&... Args
)

Operators

Name Description

Public function

TSpscQueue &

 

operator=

(
    const TSpscQueue&
)

Public function

TSpscQueue &

 

operator=

(
    TSpscQueue&&
)

Typedefs

Name

Description

ElementType