Struct UnsafeChunkedList<T>.ParallelWriter
- Namespace
- Misaki.HighPerformance.LowLevel.Collections
- Assembly
- Misaki.HighPerformance.LowLevel.dll
A parallel writer for an UnsafeChunkedList.
public readonly struct UnsafeChunkedList<T>.ParallelWriter
- Inherited Members
Remarks
Adding elements is thread-safe and auto-allocates chunks as needed, since new chunks never move existing data. The chunk pointer array must be pre-sized via EnsureCapacity(int) before dispatching parallel writes.
Fields
listData
public readonly UnsafeChunkedList<T>* listData
Field Value
Methods
Add(scoped in T)
Thread-safely adds a value, auto-allocating new chunks as needed.
public void Add(scoped in T value)
Parameters
valueT
AddRange(ReadOnlySpan<T>)
Thread-safely adds a range of elements, auto-allocating new chunks as needed.
public void AddRange(ReadOnlySpan<T> collection)
Parameters
collectionReadOnlySpan<T>