#synchronization-primitive #channel #future #oneshot-channel #async-channel #data-structures #intrusive

no-std futures-intrusive

Futures based on intrusive data structures - for std and no-std environments

10 releases

0.5.0 Nov 4, 2022
0.4.1 Oct 23, 2022
0.4.0 Nov 20, 2020
0.3.1 Apr 30, 2020
0.1.1 May 26, 2019

#18 in Concurrency

Download history 280475/week @ 2024-06-20 320906/week @ 2024-06-27 287085/week @ 2024-07-04 281385/week @ 2024-07-11 289709/week @ 2024-07-18 309626/week @ 2024-07-25 304403/week @ 2024-08-01 333937/week @ 2024-08-08 336354/week @ 2024-08-15 355486/week @ 2024-08-22 331762/week @ 2024-08-29 368062/week @ 2024-09-05 361530/week @ 2024-09-12 365506/week @ 2024-09-19 382578/week @ 2024-09-26 318924/week @ 2024-10-03

1,495,702 downloads per month
Used in 1,330 crates (83 directly)

MIT/Apache

280KB
5K SLoC

futures-intrusive

This crate provides a variety of Futures-based and async/await compatible types that are based on the idea of intrusive collections:

  • Channels in a variety of flavors:
    • Oneshot
    • Multi-Producer Multi-Consumer (MPMC)
    • State Broadcast
  • Synchronization Primitives:
    • Manual Reset Event
    • Mutex
    • Semaphore
  • A timer

Please refer to the documentation for details.

In addition to the documentation the examples provide a quick overview on how the primitives can be used.

Usage

Add this to your Cargo.toml:

[dependencies]
futures-intrusive = "^0.5"

In order to use the crate in a no-std environment, it needs to be compiled without default features:

[dependencies]
futures-intrusive = { version = "^0.5", default-features = false }

The crate defines a feature alloc, which can be used in order to re-enable alloc features. Also defined is std, which can be used in order to re-enable std features.

Minimum Rust version

The minimum required Rust version is 1.36, due to reliance on stable Future, Context and Waker types.

License

Licensed under either of

at your option.

Dependencies

~0.1–5.5MB