File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 5757//! as the final optimized code, when executed, produces the same results as the one 
5858//! without optimizations. 
5959//! 
60- //! When multiprocessing is  involved (either multiple CPU cores, or multiple  
61- //! physical CPUs), access to global variables (which are shared between threads)  
62- //! could  lead to nondeterministic results, **even if** compiler optimizations 
63- //! are disabled. 
60+ //! Due to the [concurrency]  involved in modern computers, assumptions about  
61+ //! the program's execution order are often wrong. Access to global variables  
62+ //! can  lead to nondeterministic results, **even if** compiler optimizations 
63+ //! are disabled, and it is **still possible** to introduce synchronization bugs . 
6464//! 
6565//! Note that thanks to Rust's safety guarantees, accessing global (static) 
6666//! variables requires `unsafe` code, assuming we don't use any of the 
6767//! synchronization primitives in this module. 
6868//! 
6969//! [constant folding]: https://en.wikipedia.org/wiki/Constant_folding 
70+ //! [concurrency]: https://en.wikipedia.org/wiki/Concurrency_(computer_science) 
7071//! 
7172//! ## Out-of-order execution 
7273//! 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments