mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +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:
@@ -49,7 +49,8 @@ async fn usage_stream() {
|
||||
use tokio::stream::StreamExt;
|
||||
|
||||
let start = Instant::now();
|
||||
let mut interval = time::interval(ms(10));
|
||||
let interval = time::interval(ms(10));
|
||||
tokio::pin!(interval);
|
||||
|
||||
for _ in 0..3 {
|
||||
interval.next().await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user