Struct NativeList<T>.ParallelWriter
Implements parallel writer. Use AsParallelWriter to obtain it from container.
Namespace: Unity.Collections
Syntax
[NativeContainer]
[NativeContainerIsAtomicWriteOnly]
public struct ParallelWriter
Fields
ListData
Declaration
[NativeDisableUnsafePtrRestriction]
public UnsafeList*ListData
Field Value
Type | Description |
---|---|
UnsafeList* |
Ptr
Declaration
[NativeDisableUnsafePtrRestriction]
public readonly void *Ptr
Field Value
Type | Description |
---|---|
Void* |
Methods
AddNoResize(T)
Adds an element to the list.
Declaration
public void AddNoResize(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to be added at the end of the list. |
Remarks
If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.
AddRangeNoResize(Void*, Int32)
Adds elements from a buffer to this list.
Declaration
public void AddRangeNoResize(void *ptr, int length)
Parameters
Type | Name | Description |
---|---|---|
Void* | ptr | A pointer to the buffer. |
Int32 | length | The number of elements to add to the list. |
Remarks
If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if length is negative. |
AddRangeNoResize(UnsafeList)
Adds elements from a list to this list.
Declaration
public void AddRangeNoResize(UnsafeList list)
Parameters
Type | Name | Description |
---|---|---|
UnsafeList | list | Other container to copy elements from. |
Remarks
If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.
AddRangeNoResize(NativeList<T>)
Adds elements from a list to this list.
Declaration
public void AddRangeNoResize(NativeList<T> list)
Parameters
Type | Name | Description |
---|---|---|
NativeList<T> | list | Other container to copy elements from. |
Remarks
If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.