Skip to content

Fix makeDinnerTaskGroup code example#42

Open
ryansobol wants to merge 2 commits intoDougGregor:structured-concurrencyfrom
ryansobol:patch-3
Open

Fix makeDinnerTaskGroup code example#42
ryansobol wants to merge 2 commits intoDougGregor:structured-concurrencyfrom
ryansobol:patch-3

Conversation

@ryansobol
Copy link
Copy Markdown

@ryansobol ryansobol commented Dec 31, 2020

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.

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`?
1. There are no `try await` keywords prepended to the expression initializing the task group. Was this an accidental omission?
1. 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](DougGregor#41).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants