/*** 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: AuSemaphore syncSema; AuEvent isDeadEvent; bool exiting {}; bool shuttingdown {}; bool exitingflag2 {}; AuThreadPrimitives::Event running; AuListOfHeap pendingWorkItems; bool bAlreadyDoingExitTick {}; AuThreadPrimitives::SpinLock externalFencesLock; AuList externalFences; }; }