common: Expose the lock guards publicly.

master
Damir Jelić 2020-10-10 12:08:58 +02:00
parent 661f182382
commit d039a39d84
1 changed files with 2 additions and 6 deletions

View File

@ -3,11 +3,7 @@
// https://www.reddit.com/r/rust/comments/f4zldz/i_audited_3_different_implementation_of_async/ // https://www.reddit.com/r/rust/comments/f4zldz/i_audited_3_different_implementation_of_async/
#[cfg(target_arch = "wasm32")] #[cfg(target_arch = "wasm32")]
pub use futures_locks::Mutex; pub use futures_locks::{Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
#[cfg(target_arch = "wasm32")]
pub use futures_locks::RwLock;
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
pub use tokio::sync::Mutex; pub use tokio::sync::{Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
#[cfg(not(target_arch = "wasm32"))]
pub use tokio::sync::RwLock;