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

Community feedback: Remove explicit cancellation #1256

Merged
merged 5 commits into from Jan 27, 2021

Conversation

parkera
Copy link
Member

@parkera parkera commented Jan 22, 2021

Updates from community feedback. Thank you!

@lattner
Copy link
Collaborator

lattner commented Jan 22, 2021

+1, thanks Tony

@DougGregor
Copy link
Member

Thanks, Tony. I'm going to hold off on merging this right now because we generally don't want the proposal to change substantially in the middle of a review.

@parkera
Copy link
Member Author

parkera commented Jan 22, 2021

Sounds good to me.

…es to cancel. Rework example to use first(where:).
proposals/0298-asyncsequence.md Outdated Show resolved Hide resolved
proposals/0298-asyncsequence.md Outdated Show resolved Hide resolved
Comment on lines 180 to 183
var it = myFile.lines().makeAsyncIterator()
while let value = try await it.next() {
while let line = try await it.next() {
// Do something with each line
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use do statement?

do {
  var it = myFile.lines().makeAsyncIterator()
  while let line = try await it.next() {
    // Do something with each line
  }
}

parkera and others added 2 commits January 26, 2021 15:30
Co-authored-by: Ben Rimmington <me@benrimmington.com>
Co-authored-by: Ben Rimmington <me@benrimmington.com>
@DougGregor DougGregor merged commit 13f4672 into apple:main Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants