Skip to content

Commit

Permalink
std: Ignore close_read_wakes_up on Windows
Browse files Browse the repository at this point in the history
It looks like in practice at least this test will not pass on Windows.
Empirically it is prone to blocking forever, presumably because a call to
`shutdown` doesn't actually wake up other threads on Windows.

We don't document this as a guarantee for `shutdown`, nor do we internally rely
on it. This test originated in a time long since passed when it was leveraged
for canceling I/O, but nowadays there's nothing fancy happening in the standard
library so it's not really a productive test anyway, hence just ignoring it on
Windows.

Closes rust-lang#31657
  • Loading branch information
alexcrichton committed Jan 6, 2017
1 parent 42bed72 commit 7eb43f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ mod tests {
}

#[test]
#[cfg(unix)] // test doesn't work on Windows, see #31657
fn close_read_wakes_up() {
each_ip(&mut |addr| {
let a = t!(TcpListener::bind(&addr));
Expand Down

0 comments on commit 7eb43f1

Please sign in to comment.