mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
Introduce a tokio-sync crate containing useful synchronization primitives for programs written using Tokio. The initial release contains: * An mpsc channel * A oneshot channel * A semaphore implementation * An `AtomicTask` primitive. The `oneshot` and `mpsc` channels are new implementations providing improved performance characteristics. In some benchmarks, the new mpsc channel shows up to 7x improvement over the version provided by the `futures` crate. Unfortunately, the `oneshot` implementation only provides a slight performance improvement as it is mostly limited by the `futures` 0.1 task system. Once updated to the `std` version of `Future` (currently nightly only), much greater performance improvements should be achievable by `oneshot`. Additionally, he implementations provided here are checked using [Loom](http://github.com/carllerche/loom/), which provides greater confidence of correctness.
28 lines
678 B
TOML
28 lines
678 B
TOML
[package]
|
|
name = "tokio-sync"
|
|
|
|
# When releasing to crates.io:
|
|
# - Update html_root_url.
|
|
# - Update doc url
|
|
# - Update CHANGELOG.md.
|
|
# - Create "v0.1.x" git tag.
|
|
version = "0.1.0"
|
|
authors = ["Carl Lerche <[email protected]>"]
|
|
license = "MIT"
|
|
repository = "https://github.com/tokio-rs/tokio"
|
|
homepage = "https://tokio.rs"
|
|
documentation = "https://docs.rs/tokio-sync/0.1.0/tokio_sync"
|
|
description = """
|
|
Synchronization utilities.
|
|
"""
|
|
categories = ["asynchronous"]
|
|
|
|
[dependencies]
|
|
futures = "0.1.19"
|
|
|
|
[dev-dependencies]
|
|
env_logger = { version = "0.5", default-features = false }
|
|
tokio = { path = ".." }
|
|
tokio-mock-task = "0.1.1"
|
|
loom = { version = "0.1.0", features = ["futures"] }
|