2023-11-11 10:11:09 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: IThreadPoolInternal.hpp
|
|
|
|
Date: 2023-11-04
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Async
|
|
|
|
{
|
|
|
|
struct ThreadState;
|
|
|
|
struct IAsyncRunnable;
|
|
|
|
|
|
|
|
struct IThreadPoolInternal
|
|
|
|
{
|
2023-11-12 00:18:34 +00:00
|
|
|
virtual bool WaitFor(WorkerPId_t unlocker, const AuSPtr<Threading::IWaitable> &primitive, AuUInt32 ms) = 0;
|
2023-11-11 10:11:09 +00:00
|
|
|
virtual void Run(WorkerId_t target, AuSPtr<IAsyncRunnable> runnable) = 0;
|
|
|
|
virtual AuSPtr<ThreadState> GetThreadHandle(WorkerId_t id) = 0;
|
|
|
|
virtual IThreadPool *ToThreadPool() = 0;
|
|
|
|
|
|
|
|
AuUInt32 uAtomicCounter {};
|
|
|
|
AuUInt32 uAtomicIOProcessors {};
|
|
|
|
AuUInt32 uAtomicIOProcessorsWorthlessSources {};
|
|
|
|
AuUInt32 uAtomicShutdownCookie {};
|
|
|
|
};
|
|
|
|
}
|