swift-evolution
swift-evolution copied to clipboard
Fix makeDinnerTaskGroup code example
The makeDinnerTaskGroup()
code example has a couple of potential issues:
- The
withTaskGroup()
function doesn't seem to be defined or mentioned anywhere else in this proposal. Do you meanTask.withGroup
? - There are no
try await
keywords prepended to the expression initializing the task group. Was this an accidental omission? - There is no
return
keyword prepended to the expression either. I'm not sure if this is needed or not; see my previous pull request. - The result type is
DinnerChildTask.self
. Should it beDinnerChild.self
? - [Nit-pick] It is a bit easier to read with a newline between the end of the optional declarations and the start of the
while
loop.