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

addTask(priority:operation:)

Adds a child task to the group.

Declaration 宣言

mutating func addTask(priority: TaskPriority? = nil, operation: @escaping @Sendable () async -> ChildTaskResult)

Parameters パラメータ

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.

See Also 参照

Adding Tasks to a Task Group タスクそれらをあるタスクグループに加える