Skip to content

Conversation

steveklabnik
Copy link
Contributor

Thank you @bluss for the suggested implementation.

Fixes #20844

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

src/doc/intro.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

s/who/which/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

haha, my closures are people 😉

@steveklabnik
Copy link
Contributor Author

Addressed both nits.

Thank you @bluss for the suggested implementation.

Fixes rust-lang#20844
bors added a commit that referenced this pull request Jan 14, 2015
Improve example in the intro.

Reviewed-by: alexcrichton
bors added a commit that referenced this pull request Jan 14, 2015
Improve example in the intro.

Reviewed-by: alexcrichton
bors added a commit that referenced this pull request Jan 15, 2015
Improve example in the intro.

Reviewed-by: alexcrichton
Copy link
Contributor

Choose a reason for hiding this comment

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

Join guards are collected in this example to show explicitly how the things work, right? The code will behave in exactly the same way if we would just leave them out. Am I correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, if you don't collect, the map won't do anything, as it's lazy. If you switch to a for, each guard drops out of scope on each iteration, so they end up executing serially anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, got it!

bors added a commit that referenced this pull request Jan 15, 2015
Improve example in the intro.

Reviewed-by: alexcrichton
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 15, 2015
Thank you @bluss for the suggested implementation.

Fixes rust-lang#20844
@bors bors merged commit e485d29 into rust-lang:master Jan 16, 2015
@steveklabnik steveklabnik deleted the gh20844 branch October 25, 2017 18:28
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.

The example in the concurrency guide is incorrect

7 participants