Type Aliasswift 6.0.3_Concurrency
AsyncIterator
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
typealias AsyncIterator = ThrowingTaskGroup<ChildTaskResult, Failure>.Iterator
typealias AsyncIterator = ThrowingTaskGroup<ChildTaskResult, Failure>.Iterator
import _Concurrency
@frozen struct ThrowingTaskGroup<ChildTaskResult, Failure> where ChildTaskResult : Sendable, Failure : Error
A group that contains throwing, dynamically created child tasks.
struct Iterator
A type that provides an iteration interface over the results of tasks added to the group.
protocol Sendable
protocol Error : Sendable
A type representing an error value that can be thrown.
mutating func addTask(executorPreference taskExecutor: (any TaskExecutor)?, priority: TaskPriority? = nil, operation: sending @escaping @isolated(any) () async throws -> ChildTaskResult)
Adds a child task to the group and enqueue it on the specified executor.
mutating func addTaskUnlessCancelled(executorPreference taskExecutor: (any TaskExecutor)?, priority: TaskPriority? = nil, operation: sending @escaping @isolated(any) () async throws -> ChildTaskResult) -> Bool
Adds a child task to the group and enqueue it on the specified executor, unless the group has been canceled.
func makeAsyncIterator() -> ThrowingTaskGroup<ChildTaskResult, Failure>.Iterator
typealias Element = ChildTaskResult
mutating func add(priority: TaskPriority? = nil, operation: @escaping () async throws -> ChildTaskResult) async -> Bool
mutating func async(priority: TaskPriority? = nil, operation: @escaping () async throws -> ChildTaskResult)
mutating func asyncUnlessCancelled(priority: TaskPriority? = nil, operation: @escaping () async throws -> ChildTaskResult) -> Bool
mutating func spawn(priority: TaskPriority? = nil, operation: @escaping () async throws -> ChildTaskResult)
mutating func spawnUnlessCancelled(priority: TaskPriority? = nil, operation: @escaping () async throws -> ChildTaskResult) -> Bool