-use std::sync::{TryLockResult, LockResult, RwLock, RwLockReadGuard, RwLockWriteGuard};
+use std::sync::{LockResult, RwLock, RwLockReadGuard, RwLockWriteGuard};
use std::sync::atomic::{AtomicUsize, Ordering};
/// Rust libstd's RwLock does not provide any fairness guarantees (and, in fact, when used on
res
}
- pub fn try_write(&self) -> TryLockResult<RwLockWriteGuard<T>> {
- self.lock.try_write()
- }
-
pub fn read(&self) -> LockResult<RwLockReadGuard<T>> {
if self.waiting_writers.load(Ordering::Relaxed) != 0 {
let _write_queue_lock = self.lock.write();