/*** 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 { AuMutex mutex; AuUInt32 uItems {}; AuList sortedWork[AuAsync::kEWorkPriorityCount]; bool IsEmpty(); bool IsEmpty(ThreadPool *pPool, AuWorkerId_t id); void AddWorkEntry(WorkEntry_t entry); void Dequeue(AuListOfHeap &queue, AuUInt uMaxPopCount, AuAsync::ThreadId_t idd); }; }