Jamie Reece Wilson
8944d8bd16
[+] IAsyncTimerCallback [+] ETickType.hpp [+] EWorkPriority.hpp [+] static IThreadPool::GetSelfIOProcessor() [+] static IThreadPool::GetSelfIONetInterface() [+] static IThreadPool::GetSelfIONetWorker() [-] [Source/Async/]AsyncRunnable.hpp [*] Begin encapsulating WorkerPId_t [*] WorkerPId_t no longer take strong pointers to prevent leaks given that these identifiers are copied and kept alive everywhere
27 lines
761 B
C++
27 lines
761 B
C++
/***
|
|
Copyright (C) 2021-2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuAsyncFuncRunnable.hpp
|
|
Date: 2023-12-06
|
|
Date: 2021-11-2
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Async
|
|
{
|
|
struct AsyncFuncRunnable : IAsyncRunnable
|
|
{
|
|
AuFunction<void()> callback;
|
|
AuFunction<void()> fail;
|
|
AuCriticalSection lock;
|
|
|
|
AsyncFuncRunnable(AuFunction<void()> &&callback);
|
|
AsyncFuncRunnable(AuFunction<void()> &&callback, AuFunction<void()> &&fail);
|
|
AsyncFuncRunnable(const AuFunction<void()> &callback);
|
|
AsyncFuncRunnable(const AuFunction<void()> &callback, const AuFunction<void()> &fail);
|
|
|
|
void RunAsync() override;
|
|
void CancelAsync() override;
|
|
};
|
|
} |