File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -104,9 +104,10 @@ use crate::sync::Once;
104104/// ``` 
105105#[ stable( feature = "once_cell" ,  since = "1.70.0" ) ]  
106106pub  struct  OnceLock < T >  { 
107-     // FIXME(nonpoison_once): switch to nonpoison version once it is available 
107+     /// We use `poison::Once` here to allow us to pseudo-"poison" the `Once` whenever a 
108+ /// `get_or_try_init` fails, which allows other calls to be run after a failure. 
108109once :  Once , 
109-     // Whether or not  the value is initialized is tracked by `once.is_completed()` . 
110+     /// Note that `once.is_completed()` tells us if  the value is initialized or not . 
110111value :  UnsafeCell < MaybeUninit < T > > , 
111112    /// `PhantomData` to make sure dropck understands we're dropping T in our Drop impl. 
112113/// 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments