```swift @Test func cancel() async throws { let semaphore = Semaphore() let task = Task(on: systemUnderTest) { while !Task.isCancelled { print(Task.isCancelled) } await semaphore.signal() } Task { try await Task.sleep(nanoseconds: 1_000_000_000) task.cancel() } await semaphore.wait() } ```