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 { } ;
2024-09-05 05:38:16 +00:00
AuUInt32 uAtomicIOProcessorsWorthlessSources { } ; // TODO: forgot about this. nevertheless, the default thread local io context doesnt use this, nor should it really because we cant really account for external is relevant conditions.
2023-11-11 10:11:09 +00:00
AuUInt32 uAtomicShutdownCookie { } ;
} ;
}