std::latch:: ~latch
      From cppreference.net
     
     
     
        
         C++
        
        
         
          
           
          
          
         
        
       
       
        
         Concurrency support library
        
        
         
          
           
            
          
          
          
         
        
       
       | 
 | 
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
        
         
          std::latch
         
        
        
         
          
           
            
          
          
          
         
        
       
       | Member functions | ||||
| 
                
                 
                  
                   latch::~latch
                  
                 
                
                | ||||
| Constants | ||||
| 
           
            ~latch
            
             (
            
            
             )
            
            
             ;
            
           
           | (自 C++20 起) | |
       销毁
       
        latch
       
       。
      
注释
只有在所有线程都已被通知的情况下调用析构函数才是安全的。程序员必须确保一旦析构函数开始执行,没有线程会尝试在 * this 上等待。析构函数不会通知并释放任何等待中的线程。