File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 3
3
> [!NOTE]
4
4
> This is in reverse chronological order, so newer entries are added to the top.
5
5
6
+ ## Swift (next)
7
+
8
+ * [SE-0442][]:
9
+ TaskGroups can now be created without explicitly specifying their child task's result types:
10
+
11
+ Previously the child task type would have to be specified explicitly when creating the task group:
12
+
13
+ ```swift
14
+ await withTaskGroup(of: Int.self) { group in
15
+ group.addTask { 12 }
16
+
17
+ return await group.next()
18
+ }
19
+ ```
20
+
21
+ Now the type is inferred based on the first use of the task group within the task group's body:
22
+
23
+ ```swift
24
+ await withTaskGroup { group in
25
+ group.addTask { 12 }
26
+
27
+ return await group.next()
28
+ }
29
+ ```
30
+
31
+
6
32
## Swift 6.0
7
33
8
34
* Swift 6 comes with a new language mode that prevents the risk of data races
@@ -10586,6 +10612,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
10586
10612
[SE-0424]: https://github.com/apple/swift-evolution/blob/main/proposals/0424-custom-isolation-checking-for-serialexecutor.md
10587
10613
[SE-0428]: https://github.com/apple/swift-evolution/blob/main/proposals/0428-resolve-distributed-actor-protocols.md
10588
10614
[SE-0431]: https://github.com/apple/swift-evolution/blob/main/proposals/0431-isolated-any-functions.md
10615
+ [SE-0442]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0442-allow-taskgroup-childtaskresult-type-to-be-inferred.md
10589
10616
[#64927]: <https://github.com/apple/swift/issues/64927>
10590
10617
[#42697]: <https://github.com/apple/swift/issues/42697>
10591
10618
[#42728]: <https://github.com/apple/swift/issues/42728>
You can’t perform that action at this time.
0 commit comments