Skip to content

Documentation: Calling wait on empty selection structure hangs, does not panic #22266

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

Closed
laumann opened this issue Feb 13, 2015 · 0 comments · Fixed by #22268
Closed

Documentation: Calling wait on empty selection structure hangs, does not panic #22266

laumann opened this issue Feb 13, 2015 · 0 comments · Fixed by #22268

Comments

@laumann
Copy link
Contributor

laumann commented Feb 13, 2015

In the documentation for Select it reads:

/// Creates a new selection structure. This set is initially empty and
/// `wait` will panic!() if called.

but the following program does not panic, it simply hangs.

use std::sync::mpsc::Select;
fn main() {
    Select::new().wait();
}

rustc version:

rustc 1.0.0-dev (1500df893 2015-02-11 08:54:30 +0000)
binary: rustc
commit-hash: 1500df8934431dd7842827209528211ae53ded12
commit-date: 2015-02-11 08:54:30 +0000
host: x86_64-unknown-linux-gnu
release: 1.0.0-dev
steveklabnik added a commit to steveklabnik/rust that referenced this issue Feb 13, 2015
Remove incorrect claim, add example, reformat and re-word.

Fixes rust-lang#22266
steveklabnik added a commit to steveklabnik/rust that referenced this issue Feb 13, 2015
…tsakis

Remove incorrect claim, add example, reformat and re-word.

Fixes rust-lang#22266
steveklabnik added a commit to steveklabnik/rust that referenced this issue Feb 14, 2015
…tsakis

Remove incorrect claim, add example, reformat and re-word.

Fixes rust-lang#22266
steveklabnik added a commit to steveklabnik/rust that referenced this issue Feb 15, 2015
…tsakis

Remove incorrect claim, add example, reformat and re-word.

Fixes rust-lang#22266
Manishearth added a commit to Manishearth/rust that referenced this issue Feb 15, 2015
…tsakis

 Remove incorrect claim, add example, reformat and re-word.

Fixes rust-lang#22266
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 a pull request may close this issue.

2 participants