{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Struct UnsafeQueue<T> | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct UnsafeQueue<T>

    An unmanaged queue.

    Implements
    INativeDisposable
    Namespace: Unity.Collections
    Assembly: solution.dll
    Syntax
    public struct UnsafeQueue<T> : INativeDisposable where T : unmanaged
    Type Parameters
    Name Description
    T

    The type of the elements.

    Constructors

    Name Description
    UnsafeQueue(AllocatorHandle)

    Initializes and returns an instance of UnsafeQueue.

    Properties

    Name Description
    Count

    Returns the current number of elements in this queue.

    IsCreated

    Whether this queue has been allocated (and not yet deallocated).

    Methods

    Name Description
    AsParallelWriter()

    Returns a parallel writer for this queue.

    AsReadOnly()

    Returns a readonly version of this UnsafeQueue 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(JobHandle)

    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.

    IsEmpty()

    Returns true if this queue is empty.

    Peek()

    Returns the element at the end of this queue without removing it.

    ToArray(AllocatorHandle)

    Returns an array containing a copy of this queue's content.

    TryDequeue(out T)

    Removes and outputs the element at the end of this queue.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)