Skip to content

Commit fb4368a

Browse files
committed
detach child task after filling result; dont mutate context outside of lock
1 parent 2f7a1b4 commit fb4368a

File tree

2 files changed

+88
-132
lines changed

2 files changed

+88
-132
lines changed

stdlib/public/Concurrency/DiscardingTaskGroup.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public func withDiscardingTaskGroup<GroupResult>(
8686
let result = await body(&group)
8787

8888
try! await group.awaitAllRemainingTasks() // try!-safe, cannot throw since this is a non throwing group
89+
8990
return result
9091
#else
9192
fatalError("Swift compiler is incompatible with this SDK version")

0 commit comments

Comments
 (0)