Files
Nuake-custom/Nuake/Source/Nuake/Threading/Job.cpp
2025-01-30 22:41:17 -05:00

24 lines
305 B
C++

#include "Job.h"
#include <Tracy.hpp>
using namespace Nuake;
Job::Job(std::function<void()> logic, std::function<void()> endLogic) :
job(logic),
end(endLogic)
{
this->thread = std::thread([this, logic]()
{
ZoneScoped;
job();
isDone = true;
});
}
void Job::End()
{
if (end)
{
end();
}
}