Skip to content

Commit c23cc76

Browse files
committed
mark sync::Barrier as unstable
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent 0f0b354 commit c23cc76

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ features = ["docs"]
2121
rustdoc-args = ["--cfg", "feature=\"docs\""]
2222

2323
[features]
24-
docs = []
25-
unstable = []
24+
docs = ["broadcaster"]
25+
unstable = ["broadcaster"]
2626

2727
[dependencies]
2828
async-macros = "1.0.0"
@@ -42,7 +42,7 @@ num_cpus = "1.10.1"
4242
pin-utils = "0.1.0-alpha.4"
4343
slab = "0.4.2"
4444
kv-log-macro = "1.0.4"
45-
broadcaster = "0.2.4"
45+
broadcaster = { version = "0.2.4", optional = true }
4646

4747
[dev-dependencies]
4848
femme = "1.2.0"

src/sync/barrier.rs

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ use crate::sync::Mutex;
3232
/// # });
3333
/// # }
3434
/// ```
35+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
3536
#[derive(Debug)]
3637
pub struct Barrier {
3738
state: Mutex<BarrierState>,
@@ -60,6 +61,7 @@ struct BarrierState {
6061
/// let barrier = Barrier::new(1);
6162
/// let barrier_wait_result = barrier.wait();
6263
/// ```
64+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
6365
#[derive(Debug, Clone)]
6466
pub struct BarrierWaitResult(bool);
6567

src/sync/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@
3232
#[doc(inline)]
3333
pub use std::sync::{Arc, Weak};
3434

35+
#[cfg(any(feature = "unstable", feature = "docs"))]
3536
pub use barrier::{Barrier, BarrierWaitResult};
37+
3638
pub use mutex::{Mutex, MutexGuard};
3739
pub use rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};
3840

41+
#[cfg(any(feature = "unstable", feature = "docs"))]
42+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
3943
mod barrier;
4044
mod mutex;
4145
mod rwlock;

0 commit comments

Comments
 (0)