#timer #tokio #facilities #timeout #issue #open #source

tokio-timer-patched

Timer facilities for Tokio, patched for handling issue #36, and pushed to Crates.io so that it can be used in other open source crates

1 unstable release

Uses old Rust 2015

0.1.3 Sep 17, 2018

#1812 in Asynchronous

Download history 754/week @ 2024-03-14 362/week @ 2024-03-21 348/week @ 2024-03-28 567/week @ 2024-04-04 298/week @ 2024-04-11 423/week @ 2024-04-18 762/week @ 2024-04-25 468/week @ 2024-05-02 678/week @ 2024-05-09 378/week @ 2024-05-16 505/week @ 2024-05-23 450/week @ 2024-05-30 922/week @ 2024-06-06 1118/week @ 2024-06-13 1161/week @ 2024-06-20 450/week @ 2024-06-27

3,811 downloads per month

MIT/Apache

48KB
882 lines

Notice

This is a patched fork of the original tokio-timer crate to handle issue 36. It has been pushed to crates.io so that it can be used in other open source crates. No further development is expected.

Development has moved

This repository is scheduled for deprecation in favor of tokio.

Development is continuing over there. This repository will be kept around for historical reasons.

tokio-timer

Timer facilities for Tokio

Build Status Crates.io

Documentation | Gitter

Usage

First, add this to your Cargo.toml:

[dependencies]
tokio-timer = "0.1"

Next, add this to your crate:

extern crate tokio_timer;

What is tokio-timer?

This crate provides timer facilities for usage with Tokio. Currently, the only timer implementation is a hashed timing wheel, but will provide a binary heap based timer at some point.

A timer provides the ability to set a timeout, represented as a future. When the timeout is reached, the future completes. This can be implemented very efficiently and avoiding runtime allocations.

Hashed Timing Wheel

Inspired by the paper by Varghese and Lauck, the hashed timing wheel is a great choice for the usage pattern commonly found when writing network applications.

License

tokio-timer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, and LICENSE-MIT for details.

The MPMC queue implementation is inspired from 1024cores, see LICENSE-MPMC for details.

Dependencies

~110KB