기술 자료

Unity Engine

Unity Engine

NativeRingQueue<T>

A fixed-size circular buffer. For single-threaded uses only.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public struct NativeRingQueue<T> : INativeDisposable, IDisposable where T : unmanaged

Remarks

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

Static Fields

Value

Description

MaxCapacityThe maximum number of elements this type of container can hold.

Constructors

Properties

Property

Description

CapacityThe number of elements that fit in the internal buffer.
IsCreatedWhether this queue has been allocated (and not yet deallocated).
IsEmptyWhether the queue is empty.
LengthThe number of elements currently in this queue.

Methods

Method

Description

DequeueRemoves the element from the end of the queue.
DisposeReleases all resources (memory and safety handles).
EnqueueAdds an element at the front of the queue.
TryDequeueRemoves the element from the end of the queue.
TryEnqueueAdds an element at the front of the queue.