yaar_lock/lib.rs
1//! `yaar_lock` aims to provide `#![no_std]` tools for synchronizing resource access across threads and futures.
2//!
3//! # Features
4//! By default, `yaar_lock` provides only the central building block traits and components have to be enabled explicitly.
5//!
6//! * `os`: Enables [`OsThreadEvent`] and exposes flavors of types which use it. This assumes the platform and provides interfaces to interact with it, similar to libstd.
7//! * `sync`: Enables the [`sync`] module which exposes the synchronization primitives that use OS thread blocking.
8//! * `future`: Enables the [`future`] module which exposes synchronization primitives that are future-aware.
9
10#![cfg_attr(not(test), no_std)]
11#![cfg_attr(feature = "nightly", feature(doc_cfg))]
12
13mod thread_event;
14pub use self::thread_event::*;
15
16/// Synchronization primitives based on OS thread blocking
17#[cfg(feature = "sync")]
18pub mod sync;
19
20/// Synchronization primitives based on futures.
21#[cfg(feature = "future")]
22pub mod future;