func addTask (priority: TaskPriority?, operation: @Sendable () -> ChildTaskResult)
Adds a child task to the group.
Availability
Technology
mutating func addTaskUnlessCancelled(priority: TaskPriority
? = nil, operation: @escaping @Sendable () async -> ChildTaskResult ) -> Bool
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.
true
if the child task was added to the group; otherwise false
.
func addTask (priority: TaskPriority?, operation: @Sendable () -> ChildTaskResult)