Skip to content

Commit

Permalink
Match a variable name change in the tour (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
amartini51 authored Oct 20, 2023
2 parents 7e77246 + 54594c0 commit c13aca7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TSPL.docc/GuidedTour/GuidedTour.md
Original file line number Diff line number Diff line change
Expand Up @@ -1845,15 +1845,15 @@ Task {
Use task groups to structure concurrent code.

```swift
let userIDs = await withTaskGroup(of: Int.self) { taskGroup in
let userIDs = await withTaskGroup(of: Int.self) { group in
for server in ["primary", "secondary", "development"] {
taskGroup.addTask {
group.addTask {
return await fetchUserID(from: server)
}
}

var results: [Int] = []
for await result in taskGroup {
for await result in group {
results.append(result)
}
return results
Expand Down

0 comments on commit c13aca7

Please sign in to comment.