pub fn from_pool(device: D) -> Result<Semaphore<D>, OomError> {
        let maybe_raw_sem = device.semaphore_pool().lock().unwrap().pop();
        match maybe_raw_sem {
            Some(raw_sem) => {
                Ok(Semaphore {
                       device: device,
                       semaphore: raw_sem,
                       must_put_in_pool: true,
                   })
            },
            None => {
                // Pool is empty, alloc new semaphore
                Semaphore::alloc_impl(device, true)
            },
        }
    }
/// Takes a semaphore from the vulkano-provided semaphore pool.
/// If the pool is empty, a new semaphore will be allocated.
/// Upon `drop`, the semaphore is put back into the pool.
///
/// For most applications, using the pool should be preferred,
/// in order to avoid creating new semaphores every frame.
Takes a semaphore from the vulkano-provided semaphore pool.
If the pool is empty, a new semaphore will be allocated.
Upon `drop`, the semaphore is put back into the pool.

For most applications, using the pool should be preferred,
in order to avoid creating new semaphores every frame.
Takes a semaphore from the vulkano - provided semaphore pool . If the pool is empty a new semaphore will be allocated . Upon ` drop ` the semaphore is put back into the pool . For most applications using the pool should be preferred in order to avoid creating new semaphores every frame .
pub fn from_pool(device: D) -> Result<Semaphore<D>, OomError> {
        let maybe_raw_sem = device.semaphore_pool().lock().unwrap().pop();
        match maybe_raw_sem {
            Some(raw_sem) => {
                Ok(Semaphore {
                       device: device,
                       semaphore: raw_sem,
                       must_put_in_pool: true,
                   })
            },
            None => {
                // Pool is empty, alloc new semaphore
                Semaphore::alloc_impl(device, true)
            },
        }
    }
pub fn from_pool ( device : D ) -> Result < Semaphore < D > , OomError > { let maybe_raw_sem = device . semaphore_pool ( ) . lock ( ) . unwrap ( ) . pop ( ) ; match maybe_raw_sem { Some ( raw_sem ) => { Ok ( Semaphore { device : device , semaphore : raw_sem , must_put_in_pool : true , } ) } , None => { // Pool is empty, alloc new semaphore Semaphore :: alloc_impl ( device , true ) } , } }
Takes a semaphore from the vulkano-provided semaphore pool.
Takes a semaphore from the vulkano - provided semaphore pool .
device
D
device
D