# NativeParallelMultiHashMap<TKey, TValue>.ParallelWriter

> A parallel writer for a NativeParallelMultiHashMap.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public struct NativeParallelMultiHashMap<TKey, TValue>.ParallelWriter
```

## Remarks

Use [NativeParallelMultiHashMap\<TKey, TValue>.AsParallelWriter](/engine/6000.7/script-reference/unity/collections/nativeparallelmultihashmap2/asparallelwriter.md) to create a parallel writer for a NativeParallelMultiHashMap.

## Properties

| Property                                                                                                                        | Description                                                               |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [Capacity](/engine/6000.7/script-reference/unity/collections/nativeparallelmultihashmap2/parallelwriter/capacity.md)            | Returns the number of key-value pairs that fit in the current allocation. |
| [m\_ThreadIndex](/engine/6000.7/script-reference/unity/collections/nativeparallelmultihashmap2/parallelwriter/m-threadindex.md) | Returns the index of the current thread.                                  |

## Methods

| Method                                                                                                     | Description                |
| ---------------------------------------------------------------------------------------------------------- | -------------------------- |
| [Add](/engine/6000.7/script-reference/unity/collections/nativeparallelmultihashmap2/parallelwriter/add.md) | Adds a new key-value pair. |
