{!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 NativeRingQueue<T> | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NativeRingQueue<T>

    A fixed-size circular buffer. For single-threaded uses only.

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

    The type of the elements.

    Remarks

    This container can't be used in parallel jobs, just on single-thread (for example: main thread, or single IJob).

    Constructors

    Name Description
    NativeRingQueue(int, AllocatorHandle, NativeArrayOptions)

    Initializes and returns an instance of NativeRingQueue.

    Properties

    Name 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.

    Methods

    Name Description
    Dequeue()

    Removes the element from the end of the queue.

    Dispose()

    Releases all resources (memory and safety handles).

    Dispose(JobHandle)

    Creates and schedules a job that will dispose this queue.

    Enqueue(T)

    Adds an element at the front of the queue.

    TryDequeue(out T)

    Removes the element from the end of the queue.

    TryEnqueue(T)

    Adds an element at the front of the 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)