Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

UnsafeRingQueue<T0>

struct in Unity.Collections.LowLevel.Unsafe


Implements interfaces:INativeDisposable

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A fixed-size circular buffer.

Static Properties

Property Description
MaxCapacity The maximum number of elements this type of container can hold.

Properties

Property Description
Allocator The allocator used to create the internal buffer.
Capacity The number of elements that fit in the internal buffer.
IsCreated Whether this queue has been allocated (and not yet deallocated).
IsEmpty Whether the queue is empty.
Length The number of elements currently in this queue.
Ptr The internal buffer where the content is stored.

Constructors

Constructor Description
UnsafeRingQueue_1 Initializes and returns an instance of UnsafeRingQueue which aliasing an existing buffer.

Public Methods

Method Description
Dequeue Removes the element from the end of the queue.
Dispose Releases all resources (memory and safety handles).
Enqueue Adds an element at the front of the queue.
TryDequeue Removes the element from the end of the queue.
TryEnqueue Adds an element at the front of the queue.