AuroraRuntime/Source/Async/ThreadState.hpp
Jamie Reece Wilson 8944d8bd16 [+] IAsyncTimer
[+] 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
2023-12-07 09:20:23 +00:00

38 lines
951 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ThreadState.hpp
Date: 2021-11-1
Author: Reece
***/
#pragma once
#include "IThreadPoolInternal.hpp"
#include "AuThreadState.hpp"
#include "AuGroupWorkQueue.hpp"
namespace Aurora::Async
{
struct GroupState;
struct AsyncLoop;
struct ThreadState : ThreadStateBase
{
ThreadState() :
running(true, false, true),
isDeadEvent(false, false, true)
{ }
// :vomit:
AuThreadPrimitives::Semaphore syncSema;
AuThreadPrimitives::Event isDeadEvent;
bool exiting {};
bool shuttingdown {};
bool exitingflag2 {};
AuThreadPrimitives::Event running;
AuList<WorkEntry_t> pendingWorkItems;
bool bAlreadyDoingExitTick {};
AuThreadPrimitives::SpinLock externalFencesLock;
AuList<AuThreading::IWaitable *> externalFences;
};
}