Skip to content

Commit 5fafff6

Browse files
Grammar correction: opt out -> opt-out
Co-authored-by: James Dempsey <[email protected]>
1 parent 519539b commit 5fafff6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_posts/NNNN-NN-NN-swift-5.10-released.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Swift 5.10 accomplishes full data isolation in the concurrency language model. T
1212

1313
Full data isolation in Swift 5.10 is the precursor to Swift 6. Swift 6 will enforce full data isolation by default, and we will embark upon the transition to eliminate data races across the Swift ecosystem.
1414

15-
Read on to learn about full data isolation in Swift 5.10, new unsafe opt outs for actor isolation checking, and the remaining concurrency evolution ahead of Swift 6.
15+
Read on to learn about full data isolation in Swift 5.10, new unsafe opt-outs for actor isolation checking, and the remaining concurrency evolution ahead of Swift 6.
1616

1717
## Data-race safety
1818

1919
### Full data isolation
2020

21-
Swift 5.10 rounds out the data-race safety semantics in all corners of the language, and fixes numerous bugs in `Sendable` and actor isolation checking to strengthen the guarantees of complete concurrency checking. When writing code against `-strict-concurrency=complete`, Swift 5.10 will diagnose the potential for data races at compile time except where an explicit unsafe opt out, such as `nonisolated(unsafe)` or `@unchecked Sendable`, is used.
21+
Swift 5.10 rounds out the data-race safety semantics in all corners of the language, and fixes numerous bugs in `Sendable` and actor isolation checking to strengthen the guarantees of complete concurrency checking. When writing code against `-strict-concurrency=complete`, Swift 5.10 will diagnose the potential for data races at compile time except where an explicit unsafe opt-out, such as `nonisolated(unsafe)` or `@unchecked Sendable`, is used.
2222

2323
For example, in Swift 5.9, the following code fails an isolation assertion at runtime due to a `@MainActor`-isolated initializer being evaluated outside the actor, but it was not diagnosed under `-strict-concurrency=complete`:
2424

@@ -50,11 +50,11 @@ The above code admits data races. `MyModel.shared` is a `@MainActor`-isolated st
5050

5151
You can find more details about the changes and additions to the full data isolation programming model in the [Swift 5.10 release notes](https://github.com/apple/swift/blob/release/5.10/CHANGELOG.md).
5252

53-
### Unsafe opt outs
53+
### Unsafe opt-outs
5454

5555
Swift 5.10 introduces a new `nonisolated(unsafe)` keyword to opt out of actor isolation checking for stored properties and variables. `nonisolated(unsafe)` can be used on any form of storage, including stored properties, local variables, and static or global variables.
5656

57-
`nonisolated(unsafe)` can be used as a more granular opt out for `Sendable` checking, eliminating the need for `@unchecked Sendable` wrapper types in many use cases:
57+
`nonisolated(unsafe)` can be used as a more granular opt-out for `Sendable` checking, eliminating the need for `@unchecked Sendable` wrapper types in many use cases:
5858

5959
```swift
6060
import Dispatch

0 commit comments

Comments
 (0)