-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Improve arc doc, fixing #32905 #34733
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
/// In this example, a large vector is shared between several threads. | ||
/// With simple pipes, without `Arc`, a copy would have to be made for each | ||
/// In this example, a large vector of data will be used by several threads. | ||
/// With simple pipes (XXX: wat?) instead of `Arc`, a copy would have to be made for each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear what does pipes
really mean here, any comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's referring to channels, but we can probably just remove the whole sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing looks good to me. It might be a distraction I suppose.
Note that I marked the |
lgtm when @steveklabnik's comments addressed |
/// increase the reference counter. | ||
/// In this example, a large vector of data will be shared by several threads. First we | ||
/// wrap it with a `Arc::new` and then clone the `Arc<T>` reference for every thread (which will | ||
/// increase the reference count atomically). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steveklabnik How about this?
Looks good, thanks a ton! @bors: r+ rollup |
📌 Commit a6ff05c has been approved by |
…eveklabnik Improve arc doc, fixing rust-lang#32905 As issue rust-lang#32905 detailed, I moved part of the module doc to the struct doc, and fixed some small places in the `alloc::arc`.
As issue #32905 detailed, I moved part of the module doc to the struct doc, and fixed some small places in the
alloc::arc
.