pub fn new(value: T, is_fair: bool) -> GenericMutex<MutexType, T> {
        GenericMutex::<MutexType, T> {
            value: UnsafeCell::new(value),
            state: LockApiMutex::new(MutexState::new(is_fair)),
        }
    }
/// Creates a new futures-aware mutex.
///
/// `is_fair` defines whether the `Mutex` should behave be fair regarding the
/// order of waiters. A fair `Mutex` will only allow the first waiter which
/// tried to lock but failed to lock the `Mutex` once it's available again.
/// Other waiters must wait until either this locking attempt completes, and
/// the `Mutex` gets unlocked again, or until the `MutexLockFuture` which
/// tried to gain the lock is dropped.
Creates a new futures-aware mutex.
`is_fair` defines whether the `Mutex` should behave be fair regarding the
order of waiters. A fair `Mutex` will only allow the first waiter which
tried to lock but failed to lock the `Mutex` once it's available again.
Other waiters must wait until either this locking attempt completes, and
the `Mutex` gets unlocked again, or until the `MutexLockFuture` which
tried to gain the lock is dropped.
Creates a new futures - aware mutex . ` is_fair ` defines whether the ` Mutex ` should behave be fair regarding the order of waiters . A fair ` Mutex ` will only allow the first waiter which tried to lock but failed to lock the ` Mutex ` once it ' s available again . Other waiters must wait until either this locking attempt completes and the ` Mutex ` gets unlocked again or until the ` MutexLockFuture ` which tried to gain the lock is dropped .
pub fn new(value: T, is_fair: bool) -> GenericMutex<MutexType, T> {
        GenericMutex::<MutexType, T> {
            value: UnsafeCell::new(value),
            state: LockApiMutex::new(MutexState::new(is_fair)),
        }
    }
pub fn new ( value : T , is_fair : bool ) -> GenericMutex < MutexType , T > { GenericMutex :: < MutexType , T > { value : UnsafeCell :: new ( value ) , state : LockApiMutex :: new ( MutexState :: new ( is_fair ) ) , } }
Creates a new futures-aware mutex.
Creates a new futures - aware mutex .
value
T
is_fair
bool
value
T
is_fair
bool