Skip to content

Commit 652def0

Browse files
authored
Update README.md
1 parent a4e6a7e commit 652def0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ This allows actors to synchronously start continuations and mutate their isolate
3434

3535
```swift
3636
let val: String = await withIdentifiableContinuation(isolation: self) {
37+
// exectured within actor isolation so can immediatley mutate actor state
3738
continuations[$0.id] = $0
3839
} onCancel: { id in
40+
// @Sendable closure executed outside of actor isolation requires `await` to mutate actor state
3941
Task { await self.cancelContinuation(with: id) }
4042
}
4143
```

0 commit comments

Comments
 (0)