swift-evolution icon indicating copy to clipboard operation
swift-evolution copied to clipboard

Fix makeDinnerTaskGroup code example

Open ryansobol opened this issue 4 years ago • 0 comments

The makeDinnerTaskGroup() code example has a couple of potential issues:

  1. The withTaskGroup() function doesn't seem to be defined or mentioned anywhere else in this proposal. Do you mean Task.withGroup?
  2. There are no try await keywords prepended to the expression initializing the task group. Was this an accidental omission?
  3. 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.
  4. The result type is DinnerChildTask.self. Should it be DinnerChild.self?
  5. [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.

ryansobol avatar Dec 31 '20 01:12 ryansobol