async-rs / async-rs/async-std

Replace futures-timer with a hash-wheel timer

Open
#170 1 comment 0 reactions 1 assignee Claimed by @montekki View on GitHub
enhancement
Dominant language
Rust
Stars
4.1k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

[`futures-timer`](https://github.com/rustasync/futures-timer/) is quite naive in its implementation, and we can probably do better. Something we may want to consider is building a hash-wheel timer impl to replace the existing timer.

[mozilla/neqo#127](https://github.com/mozilla/neqo/pull/127/files#diff-70ad500d4cb28767e4c01ebb6999b075) (`http/3` impl) has a relatively small implementation we may want to adopt (200 lines!). Though worth keeping an eye on https://github.com/mozilla/neqo/issues/190, where they're investigating possible other solutions.

Either way I think it's probably worth spinning up our own crate for this, and moving away from `futures-timer`. I've also gone and reserved the [`hash-wheel-timer`](https://crates.io/crates/hash-wheel-timer) name so we publish after we've built it.

Also if anyone's interested in taking this on feel free to comment below. This is not a high priority, but generally could make for some nice improvements. Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.