4 releases (2 breaking)

Uses new Rust 2024

0.3.1 Sep 4, 2025
0.2.1 Aug 5, 2025
0.1.1 Aug 5, 2025
0.1.0 Aug 5, 2025

#384 in Concurrency

Download history 6/week @ 2025-10-03 2/week @ 2025-10-10 7/week @ 2025-10-17

233 downloads per month

Custom license

64KB
1K SLoC

asycnal

Fast, executor-agnostic, asynchronous signalling primitives for multithreaded and singlethreaded runtimes

TODO: Deal wwith the waker swap

GitHub Actions Status · Crates.io Version · Crates.io Downloads · License: MIT

Features

  • Minimal unsafe code.
  • Extremely fast under high-contention, built on efficient lock-free queueing.
  • Executor agnostic.
  • Supports thread-per-core (TPC) and local runtimes.

Quickstart

You can get started with the following code:

use asyncnal::{Event, EventSetter};

let event = Event::new();
assert!(!event.has_waiters());

// We'll pre-set the event.
event.set_one();
 
// This will immediately return.
event.wait().await;

For more information, please read the documentation which contains an extensive set of examples on how this crate can be used along with the variants contained within the crate.

Testing

First, there are quite a few feature options on this crate, so if you are making any changes I would highly recommend

$ cargo install cargo-all-features
$ cargo check-all-features

Normal tests can be run as follows:

$ cargo test

Dependencies

~0.4–3MB
~42K SLoC