mark sync::Barrier as unstable

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
pull/242/head
Yoshua Wuyts 5 years ago
parent 0f0b3548a7
commit c23cc769ee
No known key found for this signature in database
GPG Key ID: 24EA8164F96777ED

@ -21,8 +21,8 @@ features = ["docs"]
rustdoc-args = ["--cfg", "feature=\"docs\""] rustdoc-args = ["--cfg", "feature=\"docs\""]
[features] [features]
docs = [] docs = ["broadcaster"]
unstable = [] unstable = ["broadcaster"]
[dependencies] [dependencies]
async-macros = "1.0.0" async-macros = "1.0.0"
@ -42,7 +42,7 @@ num_cpus = "1.10.1"
pin-utils = "0.1.0-alpha.4" pin-utils = "0.1.0-alpha.4"
slab = "0.4.2" slab = "0.4.2"
kv-log-macro = "1.0.4" kv-log-macro = "1.0.4"
broadcaster = "0.2.4" broadcaster = { version = "0.2.4", optional = true }
[dev-dependencies] [dev-dependencies]
femme = "1.2.0" femme = "1.2.0"

@ -32,6 +32,7 @@ use crate::sync::Mutex;
/// # }); /// # });
/// # } /// # }
/// ``` /// ```
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[derive(Debug)] #[derive(Debug)]
pub struct Barrier { pub struct Barrier {
state: Mutex<BarrierState>, state: Mutex<BarrierState>,
@ -60,6 +61,7 @@ struct BarrierState {
/// let barrier = Barrier::new(1); /// let barrier = Barrier::new(1);
/// let barrier_wait_result = barrier.wait(); /// let barrier_wait_result = barrier.wait();
/// ``` /// ```
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct BarrierWaitResult(bool); pub struct BarrierWaitResult(bool);

@ -32,10 +32,14 @@
#[doc(inline)] #[doc(inline)]
pub use std::sync::{Arc, Weak}; pub use std::sync::{Arc, Weak};
#[cfg(any(feature = "unstable", feature = "docs"))]
pub use barrier::{Barrier, BarrierWaitResult}; pub use barrier::{Barrier, BarrierWaitResult};
pub use mutex::{Mutex, MutexGuard}; pub use mutex::{Mutex, MutexGuard};
pub use rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard}; pub use rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};
#[cfg(any(feature = "unstable", feature = "docs"))]
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
mod barrier; mod barrier;
mod mutex; mod mutex;
mod rwlock; mod rwlock;

Loading…
Cancel
Save