2021年4月6日
摘要: std::function<>模板(万能可调用类型) 用于定义可回调列表,可以包含所有可调用的对象。 可以用于c++成员函数、隐函数、c函数、lambda表达式工4种。 //传统c函数 int c_function(int a, int b) { return a+b; } int (*f)(int 阅读全文
posted @ 2021-04-06 14:44 望月又一 阅读(351) 评论(0) 推荐(0) 编辑
摘要: ThreadPool.h #pragma once #include <iostream> #include<stdlib.h> #include<thread> #include<mutex> #include<condition_variable> #include<vector> #inclu 阅读全文
posted @ 2021-04-06 14:25 望月又一 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 多线程中等待条件 阅读全文
posted @ 2021-04-06 14:23 望月又一 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 多线程中,通过线程锁,保证数据安全 阅读全文
posted @ 2021-04-06 14:20 望月又一 阅读(140) 评论(0) 推荐(0) 编辑