-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 and fix mpsc documentation #37941
Conversation
Are the references to 'runtime' also outdated? eg. L235 |
@mfarrugi I don't really get what you mean ... could you explain more in detail ? |
I'm not clear on what runtime refers to in |
Indeed it looks like the mention of the runtime is part of the old documentation that was kept here. A quick git blame told me that most the the comments in this file were from 2013 or 2014, so definitely way before the first release of Rust. That might need another PR though ? |
☔ The latest upstream changes (presumably #38015) made this pull request unmergeable. Please resolve the merge conflicts. |
499e76a
to
b4db1a7
Compare
This has been opened for several days but I don't see any issue, I guess I'll try my luck with someone else ? |
@@ -458,6 +458,13 @@ impl<T> UnsafeFlavor<T> for Receiver<T> { | |||
/// All data sent on the sender will become available on the receiver, and no | |||
/// send will block the calling thread (this channel has an "infinite buffer"). | |||
/// | |||
/// If the [`Receiver`] is disconnected while trying to [`send`] with the |
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.
All functions/methods name should have ()
at the end.
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.
Done
/// becomes available. These channels differ greatly in the semantics of the | ||
/// sender from asynchronous channels, however. | ||
/// | ||
/// This channel has an internal buffer on which messages will be queued. `bound` | ||
/// specifies the buffer size. When the internal buffer becomes full, future sends | ||
/// will *block* waiting for the buffer to open up. Note that a buffer size of 0 | ||
/// is valid, in which case this becomes "rendezvous channel" where each send will | ||
/// not return until a recv is paired with it. | ||
/// is valid, in which case this becomes "rendezvous channel" where each [`send`] |
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.
Extra whitespace before "rendezvous". By the way, shouldn't it be rendez-vous? French in english is so strange haha.
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.
Oh and same comment for send
in here.
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.
Being french myself I had my doubts about that but in English it's definitely rendezvous :
https://fr.wikipedia.org/wiki/Rendez-vous
https://en.wikipedia.org/wiki/Rendezvous
For some unknown and I guess historical reasons the translators dropped the dash
/// will not return until a recv is paired with it. | ||
/// | ||
/// Like asynchronous channels, if the [`Receiver`] is disconnected while trying | ||
/// to [`send`] with the [`SyncSender`], the [`send`] method will return an |
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.
Same comment for send
.
Closes rust-lang#37915 This commit enhances documentation with several links and fixes an error in the `sync_channel` documentation as well: `send` doesn't panic when the senders are all disconnected
b4db1a7
to
57f998a
Compare
All good, thanks! @bors: r+ rollup |
📌 Commit 57f998a has been approved by |
…aumeGomez Improve and fix mpsc documentation Closes rust-lang#37915 This commit enhances documentation with several links and fixes an error in the `sync_channel` documentation as well: `send` doesn't panic when the senders are all disconnected r? @steveklabnik
…aumeGomez Improve and fix mpsc documentation Closes rust-lang#37915 This commit enhances documentation with several links and fixes an error in the `sync_channel` documentation as well: `send` doesn't panic when the senders are all disconnected r? @steveklabnik
Closes #37915
This commit enhances documentation with several links and
fixes an error in the
sync_channel
documentation as well:send
doesn't panic when the senders are all disconnectedr? @steveklabnik