Crates.io | async-unsync |
lib.rs | async-unsync |
version | 0.3.0 |
source | src |
created_at | 2023-03-31 18:40:46.28105 |
updated_at | 2024-03-12 13:06:30.299573 |
description | asynchronous, unsynchronized (thread-local) channels and semaphores |
homepage | |
repository | https://github.com/oliver-giersch/async-unsync.git |
max_upload_size | |
id | 826663 |
size | 141,110 |
A Rust library for asynchronous but unsynchronized (single-threaded)
communication primitives, primarily channels and semaphores with an API that is
designed to be as similar to tokio::sync
as possible.
Most async
executors use multi-threaded runtimes and consequently, most
synchronization primitives are implemented to be thread-safe, thus incurring
the associated synchronization overhead.
By restricting their use to single-threaded/thread-local tasks only, the
synchronization overhead can be entirely avoided, resulting in up to 10x faster
channel operations.
To use this crate, add the following to your Cargo.toml
:
[dependencies]
async-unsync = "0.2.2"
std
: Enabled by default, includes alloc
and adds Error
implementations for error typesalloc
: Enabled by default, required for bounded
and unbounded
channelsThis project is licensed under either of
at your choice.