Struct NativeRingQueue<T>
A fixed-size circular buffer. For single-threaded uses only.
Implements
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
[NativeContainer]
public struct NativeRingQueue<T> : INativeDisposable where T : unmanaged
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Remarks
This container can't be used in parallel jobs, just on single-thread (for example: main thread, or single IJob).
Constructors
Name | Description |
---|---|
Native |
Initializes and returns an instance of NativeRingQueue. |
Properties
Name | Description |
---|---|
Capacity | The number of elements that fit in the internal buffer. |
Is |
Whether this queue has been allocated (and not yet deallocated). |
Is |
Whether the queue is empty. |
Length | The number of elements currently in this queue. |
Methods
Name | Description |
---|---|
Dequeue() | Removes the element from the end of the queue. |
Dispose() | Releases all resources (memory and safety handles). |
Dispose(Job |
Creates and schedules a job that will dispose this queue. |
Enqueue(T) | Adds an element at the front of the queue. |
Try |
Removes the element from the end of the queue. |
Try |
Adds an element at the front of the queue. |