Skip to main content

Unity.Networking.Transport.Utilities.NativeMultiQueue-1

A NativeMultiQueue is a set of several FIFO queues split into buckets. Each bucket has its own first and last item and each bucket can have items pushed and popped individually.

Implements#

System.IDisposable

Inherited Members#

ValueType.Equals(Object)

ValueType.GetHashCode()

ValueType.ToString()

Object.Equals(Object, Object)

Object.GetType()

Object.ReferenceEquals(Object, Object)

Namespace: System.Dynamic.ExpandoObject#
Assembly: MLAPI.dll#
Syntax#
public struct NativeMultiQueue<T> : IDisposable where T : struct
Type Parameters#
NameDescription
T

Constructors#

NativeMultiQueue(Int32)#

New NativeMultiQueue has a single bucket and the specified number of items for that bucket. Accessing buckets out of range will grow the number of buckets and pushing more items than the initial capacity will increase the number of items for each bucket.

Declaration#

public NativeMultiQueue(int initialMessageCapacity)

Parameters#

TypeNameDescription
System.Int32initialMessageCapacity

Properties#

IsCreated#

Declaration#

public bool IsCreated { get; }

Property Value#

TypeDescription
System.Boolean

Methods#

Clear(Int32)#

Remove all items from a specific bucket. If the bucket does not exist the call will not do anything.

Declaration#

public void Clear(int bucket)

Parameters#

TypeNameDescription
System.Int32bucket

Dequeue(Int32, out T)#

Dequeue an item from a specific bucket. If the bucket does not exist or if the bucket is empty the call will fail and return false.

Declaration#

public bool Dequeue(int bucket, out T value)

Parameters#

TypeNameDescription
System.Int32bucket
Tvalue

Returns#

TypeDescription
System.Boolean

Dispose()#

Declaration#

public void Dispose()

Enqueue(Int32, T)#

Enqueue a new item to a specific bucket. If the bucket does not yet exist the number of buckets will be increased and if the queue is full the number of items for each bucket will be increased.

Declaration#

public void Enqueue(int bucket, T value)

Parameters#

TypeNameDescription
System.Int32bucket
Tvalue

Peek(Int32, out T)#

Peek the next item in a specific bucket. If the bucket does not exist or if the bucket is empty the call will fail and return false.

Declaration#

public bool Peek(int bucket, out T value)

Parameters#

TypeNameDescription
System.Int32bucket
Tvalue

Returns#

TypeDescription
System.Boolean

Implements#

System.IDisposable