Checking Task.isCancelled inside withCheckedContinuation block

Is checking for Task cancellation within the block passed to withCheckedContinuation supported?

Whenever I check for Task cancellation using Task.isCancelled within that block, it never returns true even though the Task, or a parent Task, was cancelled.

If I switch to use withTaskCancellationHandler, then the cancellationHandler is called, but then I need a mechanism to "pass" the cancellation down to the operation block. This is easily done, and demonstrated in Proposal 0300, but I'm just wondering if I should be able to use Task.isCancelled in that block or not.

This is on Xcode Version 13.0 beta (13A5155e)

Terms of Service

Privacy Policy

Cookie Policy