Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use async-lock for RwLock and Barrier #925

Merged
merged 3 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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