Skip to content

Commit 87b5333

Browse files
committed
Typos
1 parent c950880 commit 87b5333

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proposals/NNNN-global-actor-isolated-types-usability.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func test() {
4848
}
4949
```
5050

51-
Requiring both a global actor attribute and `@Sendable` creates an unfortunate pile-up of attributes, and it would be better for Swift to just infer `@Sendable` from the global actor attribute.
51+
Requiring both a global actor attribute and `@Sendable` creates an unfortunate pile-up of attributes, and it would be better to infer `@Sendable` from the global actor attribute.
5252

5353
Because a globally-isolated closure cannot be called concurrently, it's safe for it to capture non-`Sendable` values even if it's implicitly `@Sendable`. Such values just need to be transferred to the global actor's region (if they aren't there already). This also applies to closures that are isolated to a specific actor reference.
5454

@@ -132,7 +132,7 @@ The programmer can still choose to explicitly mark a stored property `nonisolate
132132

133133
### `@Sendable` inference for global-actor-isolated functions and closures
134134

135-
To improve usability of globally isolated functions and closures, under this proposal `@Sendable` is inferred:
135+
To improve usability of globally-isolated functions and closures, under this proposal `@Sendable` is inferred:
136136

137137
```swift
138138
func test() {
@@ -168,7 +168,7 @@ func test() {
168168
}
169169
```
170170

171-
The above code is data-race safe, since a globally isolated closure will never operate on the same instance of `NonSendable` concurrently.
171+
The above code is data-race safe, since a globally-isolated closure will never operate on the same instance of `NonSendable` concurrently.
172172

173173
Note that under region isolation in SE-0414, capturing a non-`Sendable` value in an actor-isolated closure will transfer the region into the actor, so it is impossible to have concurrent access on non-`Sendable` captures even if the isolated closure is formed outside the actor.
174174

0 commit comments

Comments
 (0)