pub fn new(t: T) -> Self
    where
        T: Sized,
    {
        Self {
            c: UnsafeCell::new(t),
            s: semaphore::Semaphore::new(1),
        }
    }
/// Creates a new lock in an unlocked state ready for use.
///
/// # Examples
///
/// ```
/// use tokio::sync::Mutex;
///
/// let lock = Mutex::new(5);
/// ```
Creates a new lock in an unlocked state ready for use.
Creates a new lock in an unlocked state ready for use .
pub fn new(t: T) -> Self
    where
        T: Sized,
    {
        Self {
            c: UnsafeCell::new(t),
            s: semaphore::Semaphore::new(1),
        }
    }
pub fn new ( t : T ) -> Self where T : Sized , { Self { c : UnsafeCell :: new ( t ) , s : semaphore :: Semaphore :: new ( 1 ) , } }
Creates a new lock in an unlocked state ready for use.
Creates a new lock in an unlocked state ready for use .
t
T
examples
```
use tokio::sync::Mutex.


` ` ` use tokio :: sync :: Mutex .