# CheckWriteAndThrow(AtomicSafetyHandle)

> Check whether the referenced native container can be written to.

## Definition

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

```csharp
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void CheckWriteAndThrow(AtomicSafetyHandle handle)
```

### Parameters

**** (\[AtomicSafetyHandle]\(/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle)): The AtomicSafetyHandle to check.

### Remarks

Throws the `InvalidOperationException` exception if the `AtomicSafetyHandle` is already destroyed or a job is currently reading or writing to the data.
