Struct NativeQueue<T> | Collections | 0.2.0-preview.13
docs.unity3d.com
    Show / Hide Table of Contents

    Struct NativeQueue<T>

    Namespace: Unity.Collections
    Syntax
    public struct NativeQueue<T> : IDisposable where T : struct
    Type Parameters
    Name Description
    T

    Constructors

    NativeQueue(Allocator)

    Declaration
    public NativeQueue(Allocator label)
    Parameters
    Type Name Description
    Allocator label

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    IsCreated

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    Boolean

    MemoryBlockSize

    Declaration
    public static int MemoryBlockSize { get; }
    Property Value
    Type Description
    Int32

    PersistentMemoryBlockCount

    Declaration
    public static int PersistentMemoryBlockCount { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    AsParallelWriter()

    Declaration
    public NativeQueue<T>.ParallelWriter AsParallelWriter()
    Returns
    Type Description
    NativeQueue.ParallelWriter<>

    Clear()

    Declaration
    public void Clear()

    Dequeue()

    Declaration
    public T Dequeue()
    Returns
    Type Description
    T

    Dispose()

    Disposes of this container and deallocates its memory immediately.

    Declaration
    public void Dispose()

    Dispose(JobHandle)

    Safely disposes of this container and deallocates its memory when the jobs that use it have completed.

    Declaration
    public JobHandle Dispose(JobHandle inputDeps)
    Parameters
    Type Name Description
    JobHandle inputDeps
    Returns
    Type Description
    JobHandle

    A new job handle containing the prior handles as well as the handle for the job that deletes the container.

    Remarks

    You can call this function dispose of the container immediately after scheduling the job. Pass the JobHandle returned by the Job.Schedule method using the jobHandle parameter so the job scheduler can dispose the container after all jobs using it have run.

    Enqueue(T)

    Declaration
    public void Enqueue(T entry)
    Parameters
    Type Name Description
    T entry

    Peek()

    Declaration
    public T Peek()
    Returns
    Type Description
    T

    TryDequeue(out T)

    Declaration
    public bool TryDequeue(out T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    Boolean

    Extension Methods

    JobNativeMultiHashMapVisitKeyValue.Schedule<TJob, TKey, TValue>(TJob, NativeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobNativeMultiHashMapVisitKeyMutableValue.Schedule<TJob, TKey, TValue>(TJob, NativeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobUnsafeMultiHashMapVisitKeyValue.Schedule<TJob, TKey, TValue>(TJob, UnsafeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobUnsafeMultiHashMapVisitKeyMutableValue.Schedule<TJob, TKey, TValue>(TJob, UnsafeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023