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

cancelAll()

Cancel all of the remaining tasks in the group. グループの中の残っているタスクの全てを取り消します。

Declaration 宣言

func cancelAll()

Discussion 解説

After cancellation, any new results or errors from the tasks in this group are silently discarded.

If you add a task to a group after canceling the group, that task is canceled immediately after being added to the group.

There are no restrictions on where you can call this method. Code inside a child task or even another task can cancel a group.

See Also 参照

Canceling Tasks タスクの取り消し

Related Documentation 関連文書

Task.isCancelled

ThrowingTaskGroup.isCancelled