Reece
99c5e1fa65
[*] Split up Aurora Async [*] Split Async app into seperate ThreadPool concept [*] Fix various OSThread bugs and tls transfer issues [*] Set default affinity to 0xFFFFFFFF [*] Update Build script [+] Add AuTuplePopFront [+] New Network Interface (unimplemented) [*] Stub out the interfaces required for a better logger [*] Fix Win32 ShellExecute bug; windows 11 struggles without explicit com init per the docs - now deferring to thread pool [*] Update gitignore [*] Follow XDG home standard [*] Refactor some namespaces to use the shorthand aliases [*] Various stability fixes
32 lines
672 B
C++
32 lines
672 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Tasks.hpp
|
|
Date: 2021-11-1
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Async
|
|
{
|
|
template<class Info_t = AVoid, class Result_t = AVoid>
|
|
struct FTask
|
|
{
|
|
using InfoType_t = Info_t;
|
|
using ResultType_t = Result_t;
|
|
|
|
AuFunction<Result_t(const Info_t &)> onFrame;
|
|
};
|
|
|
|
|
|
template<class Info_t = AVoid, class Result_t = AVoid>
|
|
struct CTask
|
|
{
|
|
using InfoType_t = Info_t;
|
|
using ResultType_t = Result_t;
|
|
|
|
Result_t(* onFrame)(const Info_t &) = 0;
|
|
};
|
|
|
|
using FVoidTask = FTask<AVoid, AVoid>;
|
|
} |