Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use async-lock for RwLock and Barrier
  • Loading branch information
Kestrer committed Dec 27, 2020
commit 3adc576853858c911584f2f01d5368a8af74d949
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ std = [
"slab",
"wasm-bindgen-futures",
"futures-channel",
"async-mutex",
"async-channel",
"async-lock",
]
alloc = [
"futures-core/alloc",
Expand All @@ -64,7 +64,7 @@ tokio03 = ["async-global-executor/tokio03"]

[dependencies]
async-attributes = { version = "1.1.1", optional = true }
async-mutex = { version = "1.1.3", optional = true }
async-lock = { version = "2.3.0", optional = true }
crossbeam-utils = { version = "0.8.0", optional = true }
futures-core = { version = "0.3.4", optional = true, default-features = false }
futures-io = { version = "0.3.4", optional = true }
Expand Down
229 changes: 0 additions & 229 deletions src/sync/barrier.rs

This file was deleted.

16 changes: 7 additions & 9 deletions src/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,20 @@
pub use std::sync::{Arc, Weak};

#[doc(inline)]
pub use async_mutex::{Mutex, MutexGuard};
pub use async_lock::{Mutex, MutexGuard, MutexGuardArc};

pub use rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard};

mod rwlock;
#[doc(inline)]
pub use async_lock::{RwLock, RwLockReadGuard, RwLockUpgradableReadGuard, RwLockWriteGuard};

cfg_unstable! {
pub use barrier::{Barrier, BarrierWaitResult};
pub use async_lock::{Barrier, BarrierWaitResult};
#[allow(deprecated)]
pub use channel::{channel, Sender, Receiver, RecvError, TryRecvError, TrySendError};
pub use condvar::Condvar;
pub(crate) use waker_set::WakerSet;

mod barrier;
mod condvar;
mod channel;
}

pub(crate) mod waker_set;
pub(crate) use waker_set::WakerSet;
pub(crate) mod waker_set;
}
Loading