摘要:        
std::for_each(threads.begin(),threads.end(), std::mem_fn(&std::thread::join)); 1. 说明 2. 写用法 3.写样例 直接参考 cplusplus官网讲解: http://www.cplusplus.com/referen    阅读全文
posted @ 2021-10-04 16:38
我是张洪铭我是熊博士
阅读(3451)
评论(0)
推荐(0)
            
        
        
摘要:        
C++/Reference/Other/functional/ STL 算法 std::mem_fn 成员函数转为函数对象 C++/Reference/Other/algorithm/ STL 算法 std::for_each 遍历一段区间内的元素,并把元素作为参数,执行一个可调用对象 C++/Re    阅读全文
posted @ 2021-10-04 15:12
我是张洪铭我是熊博士
阅读(54)
评论(0)
推荐(0)
            
        
        
摘要:        
1 #include <QCoreApplication> 2 #include <thread> 3 #include <iostream> 4 #include <algorithm> 5 #include <vector> 6 7 /* 8 * 话题1: 运行时决定线程的数量。 9 * 线程的    阅读全文
posted @ 2021-10-04 15:09
我是张洪铭我是熊博士
阅读(134)
评论(0)
推荐(0)
            
        
        
摘要:        
格式:函数 + 头文件 + 用例 + 解释说明 1. 函数 std::thread::hardware_concurrency() 头文件 #include <thread> 用例 unsigned long const hardware_threads = std::thread::hardwar    阅读全文
posted @ 2021-10-04 14:29
我是张洪铭我是熊博士
阅读(1711)
评论(0)
推荐(0)
    
                    
                
浙公网安备 33010602011771号