Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix makeDinnerTaskGroup code example #42

Open
wants to merge 2 commits into
base: structured-concurrency
Choose a base branch
from

Conversation

ryansobol
Copy link

@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