func addTaskUnlessCancelled (priority: TaskPriority?, operation: @Sendable () -> ChildTaskResult) -> Bool
Adds a child task to the group, unless the group has been canceled.
Availability
Technology
mutating func addTask(priority: TaskPriority
? = nil, operation: @escaping @Sendable () async -> ChildTaskResult )
overridingPriority
The priority of the operation task. Omit this parameter or pass .unspecified
to set the child task’s priority to the priority of the group.
operation
The operation to execute as part of the task group.
func addTaskUnlessCancelled (priority: TaskPriority?, operation: @Sendable () -> ChildTaskResult) -> Bool