AuroraRuntime/Include/Aurora/Async/Jobs.hpp
Reece 4282bb3fa6 [+] Added reschedClockAbsMs/reschedClockAbsNs
[*] Added AU_TEMPLATE_ENABLE_WHEN to utility APIs where there are PId and Id overlods
2021-11-08 00:11:01 +00:00

33 lines
803 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Jobs.hpp
Date: 2021-11-1
Author: Reece
***/
#pragma once
namespace Aurora::Async
{
template<class Info_t = AVoid, class Result_t = AVoid>
struct FJob
{
using InfoType_t = Info_t;
using ResultType_t = Result_t;
AuFunction<void(const Info_t &, const Result_t &)> onSuccess;
AuFunction<void(const Info_t &)> onFailure;
};
template<class Info_t = AVoid, class Result_t = AVoid>
struct CJob
{
using InfoType_t = Info_t;
using ResultType_t = Result_t;
void(* onSuccess)(const Info_t &, const Result_t &);
void(* onFailure)(const Info_t &);
};
using FVoidJob = FJob<AVoid, AVoid>;
}