Struct UnsafeMultiHashMap<TKey, TValue>.ParallelWriter
A parallel writer for an UnsafeMultiHashMap.
Namespace: Unity.Collections.LowLevel.Unsafe
Assembly: Unity.Collections.dll
Syntax
[NativeContainerIsAtomicWriteOnly]
public struct UnsafeMultiHashMap<TKey, TValue>.ParallelWriter
Remarks
Use AsParallelWriter() to create a parallel writer for a NativeMultiHashMap.
Properties
Capacity
Returns the number of key-value pairs that fit in the current allocation.
Declaration
public int Capacity { get; }
Property Value
Type | Description |
---|---|
int | The number of key-value pairs that fit in the current allocation. |
Methods
Add(TKey, TValue)
Adds a new key-value pair.
Declaration
public void Add(TKey key, TValue item)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The key to add. |
TValue | item | The value to add. |
Remarks
If a key-value pair with this key is already present, an additional separate key-value pair is added.