We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@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() }