1 Star 6 Fork 5

头冷 / VCU_UDS_pro

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Task.cpp 359 Bytes
一键复制 编辑 原始数据 按行查看 历史
头冷 提交于 2023-08-02 03:33 . crate
#include "Task.h"
void* Run(void *p)
{
if(p==nullptr)
{
return nullptr;
}
Task *_this=(Task*)p;
_this->f();
delete _this;
return nullptr;
}
Task::Task(std::function<void()>const &f)
{
this->f=f;
::pthread_create(nullptr,nullptr,Run,this);
}
Task::~Task()
{
qDebug()<<"Task::~Task";
}
C/C++
1
https://gitee.com/tou_leng/VCU_UDS_cache.git
git@gitee.com:tou_leng/VCU_UDS_cache.git
tou_leng
VCU_UDS_cache
VCU_UDS_pro
master

搜索帮助