pub fn write(self) -> Result<RwLockWriteGuard<'a, T>, Errno> {
        // Safety: A RwLockRef can only be obtained by calling
        // RwLock::initialize or -acquire. Therefore, we should
        // have a pointer to a valid rwlock.
        let success = Self::try_fastlock(|| unsafe {
            libc::pthread_rwlock_trywrlock(self.0.lock_ptr()) == 0
        });
        if !success {
            unsafe {
                Errno::from(libc::pthread_rwlock_wrlock(self.0.lock_ptr()))?;
            }
        }
        Ok(RwLockWriteGuard { lock: self })
    }
/// Locks this rwlock with exclusive write access, blocking the current
/// thread until it can be acquired.
///
/// Note that, according to the pthread_rwlock_wrlock manual page, this
/// returns EDEADLK of the current thread already holds the lock.
Locks this rwlock with exclusive write access, blocking the current
thread until it can be acquired.

Note that, according to the pthread_rwlock_wrlock manual page, this
returns EDEADLK of the current thread already holds the lock.
Locks this rwlock with exclusive write access blocking the current thread until it can be acquired . Note that according to the pthread_rwlock_wrlock manual page this returns EDEADLK of the current thread already holds the lock .
pub fn write(self) -> Result<RwLockWriteGuard<'a, T>, Errno> {
        // Safety: A RwLockRef can only be obtained by calling
        // RwLock::initialize or -acquire. Therefore, we should
        // have a pointer to a valid rwlock.
        let success = Self::try_fastlock(|| unsafe {
            libc::pthread_rwlock_trywrlock(self.0.lock_ptr()) == 0
        });
        if !success {
            unsafe {
                Errno::from(libc::pthread_rwlock_wrlock(self.0.lock_ptr()))?;
            }
        }
        Ok(RwLockWriteGuard { lock: self })
    }
pub fn write ( self ) -> Result < RwLockWriteGuard < ' a , T > , Errno > { // Safety: A RwLockRef can only be obtained by calling // RwLock::initialize or -acquire. Therefore, we should // have a pointer to a valid rwlock. let success = Self :: try_fastlock ( | | unsafe { libc :: pthread_rwlock_trywrlock ( self . 0 . lock_ptr ( ) ) == 0 } ) ; if ! success { unsafe { Errno :: from ( libc :: pthread_rwlock_wrlock ( self . 0 . lock_ptr ( ) ) ) ? ; } } Ok ( RwLockWriteGuard { lock : self } ) }
Locks this rwlock with exclusive write access, blocking the current
thread until it can be acquired.
Locks this rwlock with exclusive write access blocking the current thread until it can be acquired .
self
self