A fixed-size circular buffer. For single-threaded uses only.
This container can't be used in parallel jobs, just on single-thread (for example: main thread, or single IJob).
| Property | Description |
|---|---|
| MaxCapacity | The maximum number of elements this type of container can hold. |
| Property | Description |
|---|---|
| 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. |
| Constructor | Description |
|---|---|
| NativeRingQueue_1 | Initializes and returns an instance of NativeRingQueue. |
| 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. |