Table of Contents

Class SPMCQueue<T>

Namespace
Misaki.HighPerformance.Jobs
Assembly
Misaki.HighPerformance.Jobs.dll
public class SPMCQueue<T>

Type Parameters

T
Inheritance
SPMCQueue<T>
Inherited Members

Constructors

SPMCQueue(int)

Initializes a new instance of the SPMCQueue class with the specified capacity.

public SPMCQueue(int capacity)

Parameters

capacity int

The capacity of the queue.

Remarks

This queue will not resize when it reaches capacity.

Properties

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

Methods

TryPop(out T?)

Trys to pop an item from the queue.

public bool TryPop(out T? item)

Parameters

item T

The item to pop.

Returns

bool

True if an item was popped successfully; otherwise, false.

TryPush(T)

Tries to push an item onto the queue.

public bool TryPush(T item)

Parameters

item T

The item to push.

Returns

bool

True if the item was pushed successfully; otherwise, false.

TrySteal(out T?)

Trys to steal an item from the queue.

public bool TrySteal(out T? item)

Parameters

item T

The item to steal.

Returns

bool

True if an item was stolen successfully; otherwise, false.