diff options
author | bdonlan <bdonlan@gmail.com> | 2020-11-23 10:42:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 10:42:50 -0800 |
commit | ae67851f11b7cc1f577de8ce21767ce3e2c7aff9 (patch) | |
tree | be43cb76333b0e9e42a101d659f9b2e41555d779 /tokio/tests/sync_mutex_owned.rs | |
parent | f927f01a34d7cedf0cdc820f729a7a6cd56e83dd (diff) |
time: use intrusive lists for timer tracking (#3080)
More-or-less a half-rewrite of the current time driver, supporting the
use of intrusive futures for timer registration.
Fixes: #3028, #3069
Diffstat (limited to 'tokio/tests/sync_mutex_owned.rs')
-rw-r--r-- | tokio/tests/sync_mutex_owned.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tokio/tests/sync_mutex_owned.rs b/tokio/tests/sync_mutex_owned.rs index 394a6708..0f1399c4 100644 --- a/tokio/tests/sync_mutex_owned.rs +++ b/tokio/tests/sync_mutex_owned.rs @@ -58,10 +58,11 @@ async fn aborted_future_1() { let m2 = m1.clone(); // Try to lock mutex in a future that is aborted prematurely timeout(Duration::from_millis(1u64), async move { - let mut iv = interval(Duration::from_millis(1000)); + let iv = interval(Duration::from_millis(1000)); + tokio::pin!(iv); m2.lock_owned().await; - iv.tick().await; - iv.tick().await; + iv.as_mut().tick().await; + iv.as_mut().tick().await; }) .await .unwrap_err(); |