Revert "[Concurrency] isCanceled spelling to follow guidance"

This commit is contained in:
Konrad `ktoso` Malawski
2021-01-23 07:27:34 +09:00
committed by GitHub
parent 4988127e99
commit 80ee936a72
13 changed files with 48 additions and 48 deletions

View File

@@ -6,7 +6,7 @@ func asyncThrowsFunc() async throws -> Int { 42 }
func asyncThrowsOnCancel() async throws -> Int {
// terrible suspend-spin-loop -- do not do this
// only for purposes of demonstration
while await !Task.isCanceled() {
while await !Task.isCancelled() {
await Task.sleep(until: Task.Deadline.in(.seconds(1)))
}