We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7e77246 + 54594c0 commit c13aca7Copy full SHA for c13aca7
TSPL.docc/GuidedTour/GuidedTour.md
@@ -1845,15 +1845,15 @@ Task {
1845
Use task groups to structure concurrent code.
1846
1847
```swift
1848
-let userIDs = await withTaskGroup(of: Int.self) { taskGroup in
+let userIDs = await withTaskGroup(of: Int.self) { group in
1849
for server in ["primary", "secondary", "development"] {
1850
- taskGroup.addTask {
+ group.addTask {
1851
return await fetchUserID(from: server)
1852
}
1853
1854
1855
var results: [Int] = []
1856
- for await result in taskGroup {
+ for await result in group {
1857
results.append(result)
1858
1859
return results
0 commit comments