/*** Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: AuGroupWorkQueue.hpp Date: 2023-11-04 Author: Reece ***/ #pragma once namespace Aurora::Async { struct IAsyncRunnable; struct ThreadPool; struct ThreadState; using WorkEntry_t = AuPair>; struct GroupWorkQueue { AuThreadPrimitives::Mutex mutex; AuUInt32 uItems {}; AuList sortedWork[AuAsync::kEWorkPrioCount]; bool IsEmpty(); bool IsEmpty(ThreadPool *pPool, AuWorkerId_t id); void AddWorkEntry(ThreadState *pState, WorkEntry_t entry); void Dequeue(AuList &queue, int maxPopCount, AuAsync::ThreadId_t idd); }; }