forked from mirror/async-std
mark sync::Barrier as unstable
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
parent
0f0b3548a7
commit
c23cc769ee
3 changed files with 9 additions and 3 deletions
|
@ -21,8 +21,8 @@ features = ["docs"]
|
|||
rustdoc-args = ["--cfg", "feature=\"docs\""]
|
||||
|
||||
[features]
|
||||
docs = []
|
||||
unstable = []
|
||||
docs = ["broadcaster"]
|
||||
unstable = ["broadcaster"]
|
||||
|
||||
[dependencies]
|
||||
async-macros = "1.0.0"
|
||||
|
@ -42,7 +42,7 @@ num_cpus = "1.10.1"
|
|||
pin-utils = "0.1.0-alpha.4"
|
||||
slab = "0.4.2"
|
||||
kv-log-macro = "1.0.4"
|
||||
broadcaster = "0.2.4"
|
||||
broadcaster = { version = "0.2.4", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
femme = "1.2.0"
|
||||
|
|
|
@ -32,6 +32,7 @@ use crate::sync::Mutex;
|
|||
/// # });
|
||||
/// # }
|
||||
/// ```
|
||||
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
||||
#[derive(Debug)]
|
||||
pub struct Barrier {
|
||||
state: Mutex<BarrierState>,
|
||||
|
@ -60,6 +61,7 @@ struct BarrierState {
|
|||
/// let barrier = Barrier::new(1);
|
||||
/// let barrier_wait_result = barrier.wait();
|
||||
/// ```
|
||||
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct BarrierWaitResult(bool);
|
||||
|
||||
|
|
|
@ -32,10 +32,14 @@
|
|||
#[doc(inline)]
|
||||
pub use std::sync::{Arc, Weak};
|
||||
|
||||
#[cfg(any(feature = "unstable", feature = "docs"))]
|
||||
pub use barrier::{Barrier, BarrierWaitResult};
|
||||
|
||||
pub use mutex::{Mutex, MutexGuard};
|
||||
pub use rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
|
||||
#[cfg(any(feature = "unstable", feature = "docs"))]
|
||||
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
||||
mod barrier;
|
||||
mod mutex;
|
||||
mod rwlock;
|
||||
|
|
Loading…
Reference in a new issue