diff options
author | Jon Gjengset <jon@thesquareplanet.com> | 2020-02-12 14:09:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 11:09:44 -0800 |
commit | c1232a65207e3b2d42d82b9144658f6293287089 (patch) | |
tree | 883579843c03175e28526bfaba09d429d0b8a098 /tokio/src/util | |
parent | 5e75b0446d771f527d65ecc7ba34e2276eb2bf21 (diff) |
io: avoid unnecessary wake in registration (#2221)
See discussion in #2222. This wake/notify call has been there in one
form or another since the very early days of tokio. Currently though, it
is not clear that it is needed; the contract for polling is that you
must keep polling until you get `Pending`, so doing a wakeup when we are
about to return `Ready` is premature.
Diffstat (limited to 'tokio/src/util')
-rw-r--r-- | tokio/src/util/bit.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tokio/src/util/bit.rs b/tokio/src/util/bit.rs index d18298f7..e61ac216 100644 --- a/tokio/src/util/bit.rs +++ b/tokio/src/util/bit.rs @@ -33,6 +33,7 @@ impl Pack { } /// Mask used to unpack value + #[cfg(all(test, loom))] pub(crate) const fn mask(&self) -> usize { self.mask } |