Skip to content

Commit 41ed260

Browse files
authored
Update README.md
1 parent 900560d commit 41ed260

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ To install using Swift Package Manager, add this to the `dependencies:` section
2222

2323
# Usage
2424

25-
With Swift 6, usage is similar to existing continuations where the closure is executed syncronously within the current isolation allowing actors to mutate their isolated state.
25+
With Swift 6, usage is similar to existing continuations.
2626

2727
```swift
2828
let val: String = await withIdentifiableContinuation {
2929
continuations[$0.id] = $0
3030
}
3131
```
3232

33+
The body closure is executed syncronously within the current isolation allowing actors to mutate their isolated state.
34+
3335
An optional cancellation handler is called when the task is cancelled. The handler is `@Sendable` and can be called at any time _after_ the body has completed.
3436

3537
```swift
@@ -43,7 +45,7 @@ let val: String = await withIdentifiableContinuation {
4345

4446
## Swift 5
4547

46-
While behaviour is identical, Swift 5 is unable to automatically inherit actor isolation through the new `#isolation` keyword ([SE-420](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0420-inheritance-of-actor-isolation.md)) so an `isolated` reference to the current actor must always be passed.
48+
While behaviour is identical, Swift 5 is unable to inherit actor isolation through the new `#isolation` keyword ([SE-420](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0420-inheritance-of-actor-isolation.md)) so an `isolated` reference to the current actor must always be passed.
4749

4850
```swift
4951
let val: String = await withIdentifiableContinuation(isolation: self) {

0 commit comments

Comments
 (0)