mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
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
This commit is contained in:
@@ -68,7 +68,7 @@ async fn starving() {
|
||||
}
|
||||
|
||||
let when = Instant::now() + Duration::from_millis(20);
|
||||
let starve = Starve(sleep_until(when), 0);
|
||||
let starve = Starve(Box::pin(sleep_until(when)), 0);
|
||||
|
||||
starve.await;
|
||||
assert!(Instant::now() >= when);
|
||||
|
||||
Reference in New Issue
Block a user