Array
extension Array where Element: Task
-
Executes each task in this array and returns an array of
Results in the completion blockSeeAlso:
Task.async(...)for the rest of the parametersDeclaration
Swift
@discardableResult public func async( using taskManager: TaskManager? = nil, inOrder: Bool = false, after interval: DispatchTimeInterval? = nil, queue: DispatchQueue? = nil, timeout: DispatchTimeInterval? = nil, completion: ((Result<[Result<Element.SuccessValue, Error>], Error>) -> Void)? = nil ) -> HandleParameters
inOrdertrue if you want the tasks executed strictly one after the other
-
Executes each task in line and awaits an array of each tasks’ result
SeeAlso:
Task.await(...)for the rest of the parametersDeclaration
Swift
public func await( using taskManager: TaskManager? = nil, inOrder: Bool = false, timeout: DispatchTimeInterval? = nil ) throws -> [Result<Element.SuccessValue, Error>]Parameters
inOrdertrue if you want the tasks executed strictly one after the other
-
Executes each task in line and awaits an array of each tasks suceess result If none of the tasks succeed or there’re no tasks anyway then an empty array will be returned
SeeAlso:
Task.await(...)for the rest of the parametersDeclaration
Swift
public func awaitSuccess( using taskManager: TaskManager? = nil, inOrder: Bool = false, timeout: DispatchTimeInterval? = nil ) -> [Element.SuccessValue]Parameters
inOrdertrue if you want the tasks executed strictly one after the other
View on GitHub
Array Extension Reference