Struct NativeQueue<T>
An unmanaged queue.
Implements
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
[NativeContainer]
public struct NativeQueue<T> : INativeDisposable where T : unmanaged
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Constructors
Name | Description |
---|---|
Native |
Initializes and returns an instance of NativeQueue. |
Properties
Name | Description |
---|---|
Count | Returns the current number of elements in this queue. |
Is |
Whether this queue has been allocated (and not yet deallocated). |
Methods
Name | Description |
---|---|
As |
Returns a parallel writer for this queue. |
As |
Returns a readonly version of this NativeQueue instance. |
Clear() | Removes all elements of this queue. |
Dequeue() | Removes and returns the element at the end of this queue. |
Dispose() | Releases all resources (memory and safety handles). |
Dispose(Job |
Creates and schedules a job that releases all resources (memory and safety handles) of this queue. |
Enqueue(T) | Adds an element at the front of this queue. |
Is |
Returns true if this queue is empty. |
Peek() | Returns the element at the end of this queue without removing it. |
To |
Returns an array containing a copy of this queue's content. |
Try |
Removes and outputs the element at the end of this queue. |