---
title: "store(_:ordering:)"
framework: synchronization
role: symbol
role_heading: Instance Method
path: "synchronization/atomic/store(_:ordering:)-532ut"
---

# store(_:ordering:)

Atomically sets the current value to desired, applying the specified memory ordering.

## Declaration

```swift
func store(_ desired: consuming Value, ordering: AtomicStoreOrdering)
```

## Parameters

- `desired`: The desired new value.
- `ordering`: The memory ordering to apply on this operation.
