# UnsafeParallelHashSet<T>.ParallelWriter

> A parallel writer for an UnsafeParallelHashSet.

## Definition

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

```csharp
public struct UnsafeParallelHashSet<T>.ParallelWriter
```

## Remarks

Use [UnsafeParallelHashSet\<T>.AsParallelWriter](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashset1/asparallelwriter.md) to create a parallel writer for a set.

## Properties

| Property                                                                                                                        | Description                                              |
| ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| [Capacity](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashset1/parallelwriter/capacity.md) | The number of values that fit in the current allocation. |

## Methods

| Method                                                                                                                      | Description                                                                                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Add](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashset1/parallelwriter/add.md)       | Adds a new item. If the item is already present in the collection, this method **should** throw, but currently does not! Instead, it returns false without replacing said item. |
| [TryAdd](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashset1/parallelwriter/tryadd.md) | Adds a new value. If the item is already present, this method returns false without replacing said item.                                                                        |
