Struct NativeHashSet<T>.ParallelWriter
Implements parallel writer. Use AsParallelWriter to obtain it from container.
Namespace: Unity.Collections
Syntax
[NativeContainerIsAtomicWriteOnly]
public struct ParallelWriter
Properties
Capacity
The number of items that can fit in the container.
Declaration
public int Capacity { get; }
Property Value
Type | Description |
---|---|
Int32 | The number of items that the container can hold before it resizes its internal storage. |
Remarks
Capacity specifies the number of items the container can currently hold.
Methods
Add(T)
Add the specified element into the container. If the specified element already exists in the container it returns false.
Declaration
public bool Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The element to add to the container. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the specified element is added into the container, otherwise returns false. |