diff options
author | Carl Lerche <me@carllerche.com> | 2020-07-12 19:25:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-12 19:25:58 -0700 |
commit | 98e78314794607d0b402d5e45c66e3b8e38b819c (patch) | |
tree | bbfd7d0d84cdd4fc58fe7adbdf5758b1c4aaf8e6 /tokio/tests/rt_common.rs | |
parent | 8411a6945f2d4711a9422dfd4d3362e08b6e8f99 (diff) |
net: fix OwnedWriteHalf behavior on drop (#2597)
Previously, dropping the Write handle would issue a `shutdown(Both)`. However,
shutting down the read half is not portable and not the correct action to take.
This changes the behavior of OwnedWriteHalf to only perform a `shutdown(Write)`
on drop.
Diffstat (limited to 'tokio/tests/rt_common.rs')
-rw-r--r-- | tokio/tests/rt_common.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tokio/tests/rt_common.rs b/tokio/tests/rt_common.rs index 9f2d3d66..71101d46 100644 --- a/tokio/tests/rt_common.rs +++ b/tokio/tests/rt_common.rs @@ -601,6 +601,19 @@ rt_test! { } #[test] + // IOCP requires setting the "max thread" concurrency value. The sane, + // default, is to set this to the number of cores. Threads that poll I/O + // become associated with the IOCP handle. Once those threads sleep for any + // reason (mutex), they yield their ownership. + // + // This test hits an edge case on windows where more threads than cores are + // created, none of those threads ever yield due to being at capacity, so + // IOCP gets "starved". + // + // For now, this is a very edge case that is probably not a real production + // concern. There also isn't a great/obvious solution to take. For now, the + // test is disabled. + #[cfg(not(windows))] fn io_driver_called_when_under_load() { let mut rt = rt(); |