Skip to content

Commit 6877d5d

Browse files
committed
Added an explicit callout to how enter in the example suffices for a cancellation check.
1 parent 7a9fba3 commit 6877d5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ struct Example: View {
4545
}
4646
```
4747

48+
Note that `enter` will always throw if the task is cancelled, so you don't need to manually check for cancellation (e.g. `Task.checkCancellation` / `Task.isCancelled`) if you are using `Gate` entry like in the above example.
49+
4850
## Thanks to…
4951

5052
This was inspired by (and based in part on) [Gwendal Roué](https://github.com/groue)'s [`Semaphore`](https://github.com/groue/Semaphore) package.

0 commit comments

Comments
 (0)