Instance Method インスタンスメソッド

cancel()

Indicates that the task should stop running.

Declaration 宣言

func cancel()

Discussion 解説

Task cancellation is cooperative: a task that supports cancellation checks whether it has been canceled at various points during its work.

Calling this method on a task that doesn’t support cancellation has no effect. Likewise, if the task has already run past the last point where it would stop early, calling this method has no effect.

See Also 参照

Canceling Tasks タスクの取り消し

Related Documentation 関連文書

Task.checkCancellation()