c++11 multi-threading
2023-04-07 11:30:52   12  举报             
     
         
 AI智能生成
  c++11多线程
    作者其他创作
 大纲/内容
  condition_variable    
     condition_variable
only take unique_lock<mutex>
    
    only take unique_lock<mutex>
 wait  
     wait_for  
     wait_until  
     notify_one  
     notify_all  
     condition_variable_any
any lock
  
    any lock
 cv_status    
     timeout  
     no_timeout  
     notify_all_at_thread_exit  
     mutex    
     mutex    
     lock  
     try_lock
Lock mutex if not locked
  
    Lock mutex if not locked
 unlock  
     native_handle  
     recursive_mutex
acquire multiple levels of ownership
  
    acquire multiple levels of ownership
 timed_mutex    
     try_lock_for  
     try_lock_until  
     recursive_timed_mutex  
     lock_guard
keeping it always locked
until the end of its context
  
    keeping it always locked
until the end of its context
 unique_lock    
     lock  
     try_lock  
     try_lock_for  
     try_lock_until  
     unlock  
     once_flag  
     adopt_lock_t  
     defer_lock_t  
     try_to_lock_t  
     function    
     try_lock  
     lock  
     call_once  
     atomic    
     kill_dependency  
     atomic_thread_fence  
     atomic_signal_fence  
     atomic    
     is_lock_free  
     sotre  
     load  
     exchange  
     compare_exchange_weak
true if expected compares equal to the contained value
  
    true if expected compares equal to the contained value
 compare_exchange_strong  
     fetch_add  
     atomic_flag    
     test_and_set  
     clear  
     ATOMIC_FLAG_INIT
clear state
  
    clear state
 future    
     promise  
     packaged_task  
     future  
     shared_future  
     future_error  
     future_errc  
     future_status  
     launch  
     async  
     future_category  
     thread    
     thread    
     get_id  
     joinable  
     join
调用该函数的线程必须等待该函数执行完毕
    调用该函数的线程必须等待该函数执行完毕
 detach  
     swap  
     this_thread
access the current thread
    
    access the current thread
 get_id  
     yield
避免一个线程频繁与其他线程争抢CPU时间片
  
    避免一个线程频繁与其他线程争抢CPU时间片
 sleep_untill
等待到一个绝对时间点
    等待到一个绝对时间点
 sleep_for  
    
 
 
 
 
  0 条评论
 下一页
  
   
  
  
  
  
  
  
  
  
  
  
 