pub struct RwLock<T> {
    inner: RwLock<T>,
    rank: LockRank,
}Expand description
An RwLock instrumented for deadlock prevention.
This is just a wrapper around a parking_lot::RwLock, along with
its rank in the wgpu_core lock ordering.
For details, see the module documentation.
Fields§
§inner: RwLock<T>§rank: LockRankImplementations§
Source§impl<T> RwLock<T>
 
impl<T> RwLock<T>
pub fn new(rank: LockRank, value: T) -> RwLock<T>
pub fn read(&self) -> RwLockReadGuard<'_, T>
pub fn write(&self) -> RwLockWriteGuard<'_, T>
Sourcepub unsafe fn force_unlock_read(&self, data: RankData)
 
pub unsafe fn force_unlock_read(&self, data: RankData)
Force an read-unlock operation on this lock.
Safety:
- A read lock must be held which is not held by a guard.
 
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for RwLock<T>
impl<T> !RefUnwindSafe for RwLock<T>
impl<T> Send for RwLock<T>where
    T: Send,
impl<T> Sync for RwLock<T>
impl<T> Unpin for RwLock<T>where
    T: Unpin,
impl<T> UnwindSafe for RwLock<T>where
    T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more