pub fn wait<'a>(&'a self) -> Option<&'a T> {
        loop {
            match self.state.load(Ordering::SeqCst) {
                INCOMPLETE => return None,
                RUNNING => cpu_relax(), // We spin
                COMPLETE => return Some(self.force_get()),
                PANICKED => panic!("Once has panicked"),
                _ => unsafe { unreachable() },
            }
        }
    }
/// Like try, but will spin if the `Once` is in the process of being
/// initialized
Like try, but will spin if the `Once` is in the process of being
initialized
Like try but will spin if the ` Once ` is in the process of being initialized
pub fn wait<'a>(&'a self) -> Option<&'a T> {
        loop {
            match self.state.load(Ordering::SeqCst) {
                INCOMPLETE => return None,
                RUNNING => cpu_relax(), // We spin
                COMPLETE => return Some(self.force_get()),
                PANICKED => panic!("Once has panicked"),
                _ => unsafe { unreachable() },
            }
        }
    }
pub fn wait < ' a > ( & ' a self ) -> Option < & ' a T > { loop { match self . state . load ( Ordering :: SeqCst ) { INCOMPLETE => return None , RUNNING => cpu_relax ( ) , // We spin COMPLETE => return Some ( self . force_get ( ) ) , PANICKED => panic ! ( " " ) , _ => unsafe { unreachable ( ) } , } } }
Like try, but will spin if the `Once` is in the process of being
initialized
Like try but will spin if the ` Once ` is in the process of being initialized
&'a self
&'a self