diff options
author | greenwoodcm <greenwd@amazon.com> | 2020-10-06 12:48:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 12:48:01 -0700 |
commit | fcdf9345bf19e9a1e1664f01713f9eba54da27c5 (patch) | |
tree | 2d5d1a380e2e5bf29979335a553d19665aaaef29 /tokio/src/time/tests | |
parent | 4cf45c038b9691f24fac22df13594c2223b185f6 (diff) |
time: clean time driver (#2905)
* remove unnecessary wheel::Poll
the timer wheel uses the `wheel::Poll` struct as input when
advancing the timer to the next time step. the `Poll` struct
contains an instant representing the time step to advance to
and also contains an optional and mutable reference to an
`Expiration` struct. from what I can tell, the latter field
is only used in the context of polling the wheel and does not
need to be exposed outside of that method. without the
expiration field the `Poll` struct is nothing more than a
wrapper around the instant being polled. this change removes
the `Poll` struct and updates integration points accordingly.
* remove Stack trait in favor of concrete Stack implementation
* remove timer Registration struct
Diffstat (limited to 'tokio/src/time/tests')
-rw-r--r-- | tokio/src/time/tests/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tokio/src/time/tests/mod.rs b/tokio/src/time/tests/mod.rs index e112b8e1..a043d65e 100644 --- a/tokio/src/time/tests/mod.rs +++ b/tokio/src/time/tests/mod.rs @@ -8,10 +8,10 @@ fn assert_sync<T: Sync>() {} #[test] fn registration_is_send_and_sync() { - use crate::time::driver::Registration; + use crate::time::delay::Delay; - assert_send::<Registration>(); - assert_sync::<Registration>(); + assert_send::<Delay>(); + assert_sync::<Delay>(); } #[test] |