next()
Advances to and returns the result of the next child task.
Declaration
mutating func next() async -> TaskGroup<ChildTaskResult>.Iterator.Element?Return Value
The value returned by the next child task that completes, or nil if there are no remaining child tasks,
Discussion
The elements returned from this method appear in the order that the tasks completed, not in the order that those tasks were added to the task group. After this method returns nil, this iterator is guaranteed to never produce more values.
For more information about the iteration order and semantics, see TaskGroup.next().