AuroraRuntime/Source/Async/AuAsyncFuncWorker.hpp

27 lines
593 B
C++
Raw Normal View History

/***
Copyright (C) 2021-2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuAsyncFuncWorker.hpp
Date: 2023-12-06
Date: 2021-11-2
Author: Reece
***/
#pragma once
#include "WorkItem.hpp"
namespace Aurora::Async
{
struct AsyncFuncWorker : WorkItem
{
AsyncFuncWorker(IThreadPoolInternal *owner,
const WorkerPId_t &worker,
AuVoidFunc &&func);
void DispatchTask(IWorkItemHandler::ProcessInfo &info) override;
void Cleanup() override;
private:
AuVoidFunc func;
};
}