Skip to content

oliver-giersch/async-unsync

Repository files navigation

async-unsync - Single Threaded Async Channels

Build Status crates.io

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.

Usage

To use this crate, add the following to your Cargo.toml:

[dependencies]
async-unsync = "0.2.2"

Cargo Features

  • std: Enabled by default, includes alloc and adds Error implementations for error types
  • alloc: Enabled by default, required for bounded and unbounded channels

License

This project is licensed under either of

at your choice.

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages