摘要:
std::function<>模板(万能可调用类型) 用于定义可回调列表,可以包含所有可调用的对象。 可以用于c++成员函数、隐函数、c函数、lambda表达式工4种。 //传统c函数 int c_function(int a, int b) { return a+b; } int (*f)(int 阅读全文
摘要:
ThreadPool.h #pragma once #include <iostream> #include<stdlib.h> #include<thread> #include<mutex> #include<condition_variable> #include<vector> #inclu 阅读全文
摘要:
多线程中等待条件 阅读全文
摘要:
多线程中,通过线程锁,保证数据安全 阅读全文