-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Document #39364 – Panic in mpsc::Receiver::recv_timeout #52936
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
Conversation
I think the documentation should have a small explanation of the bug, so that people can see on a quick glance if they might be affected. Moreover I think some sort of explanation why it hasn't been fixed yet should be added, otherwise it might seem to outsider like "Oh look at Rust, they know they have a critical bug in one of the core synchronization primitives and don't fix it. How should I ever be able to trust that language!!1!1". |
Thanks for the PR! We’ll periodically check in on it to make sure that @alexcrichton or someone else from the team reviews it soon. |
Thanks! Could this be expanded a bit to say that this is an unexpected panic which is a bug in the standard library? Otherwise the current documentation sort of seems like it's expected to be buggy... |
Ok, I've added the reproducible example for people to see if they are affected, mentioning that it is a "currently ... unexpected" panic. As to explaining the bug or why it isn't fixed yet, I'm at a loss. |
Btw I don't have docs set up, so I can't test whether the comments render fine. |
This comment has been minimized.
This comment has been minimized.
src/libstd/sync/mpsc/mod.rs
Outdated
@@ -1249,7 +1249,29 @@ impl<T> Receiver<T> { | |||
/// | |||
/// # Panics |
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.
Perhaps this section should be Bugs
or Known problems
rather than Panics
?
src/libstd/sync/mpsc/mod.rs
Outdated
/// use std::sync::mpsc::channel; | ||
/// use std::thread; | ||
/// use std::time::Duration; | ||
/// |
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.
[00:03:46] tidy error: /checkout/src/libstd/sync/mpsc/mod.rs:1259: trailing whitespace
Ping from triage @alexcrichton: This PR requires your review. |
@bors: r+ |
📌 Commit 025f41f has been approved by |
Document #39364 – Panic in mpsc::Receiver::recv_timeout I can still reproduce #39364 with the example code at #39364 (comment). I'm opening this PR in an attempt to document this bug as a known issue in [libstd/sync/mpsc/mod.rs](https://github.com/rust-lang/rust/blob/master/src/libstd/sync/mpsc/mod.rs). Inputs very much welcome. ([Nightly docs for `recv_timeout`.](https://doc.rust-lang.org/nightly/std/sync/mpsc/struct.Receiver.html?search=#method.recv_timeout))
☀️ Test successful - status-appveyor, status-travis |
I can still reproduce #39364 with the example code at #39364 (comment).
I'm opening this PR in an attempt to document this bug as a known issue in libstd/sync/mpsc/mod.rs.
Inputs very much welcome. (Nightly docs for
recv_timeout
.)