2 Star 4 Fork 8

Mark Liu / linux_socket_epoll

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
thread_task.h 517 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mark Liu 提交于 2021-05-23 18:56 . linux socket epoll
/**
* ClassName: thread_task
* Description: thread task
* Author: Mark yunsheng.Liu
* Date: 2021/05/21
* Version: V1.0
* QQ:120772981
**/
class thread_task{
public:
typedef void task_fun(void*);
thread_task(task_fun *pfun, void *pargs)
:fun(pfun),
args(pargs) {
}
~thread_task(){
}
void do_work() {
if(fun){
fun(args);
}
}
private:
void *args;
task_fun *fun;
};
C++
1
https://gitee.com/liuyunsheng/socket_epoll.git
git@gitee.com:liuyunsheng/socket_epoll.git
liuyunsheng
socket_epoll
linux_socket_epoll
master

搜索帮助