SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::ThreadModel Class Reference

Wrappers of all Thread Pool. More...

#include <ThreadModel.h>

Public Member Functions

 ThreadModel ()
 Constructor Function.
 
virtual ~ThreadModel ()=default
 Destructor Function.
 
void InitCustomThreadPool ()
 Init Custom ThreadPool.
 
void InitGameThreadPool ()
 Init Game ThreadPool.
 
void InitRHIThreadPool (std::function< void(std::shared_ptr< VulkanCmdThreadPool > &ptr)> fn)
 Init RHI ThreadPool.
 
void ShutDownThreadModel ()
 Shutdown this ThreadModel.
 
std::shared_ptr< ThreadPoolGetCustomThreadPool ()
 Get Custom ThreadPool.
 
std::shared_ptr< ThreadPoolGetGameThreadPool ()
 Get Game ThreadPool.
 
std::shared_ptr< VulkanCmdThreadPoolGetRHIThreadPool ()
 Get RHI ThreadPool.
 
scl::thread_queue< std::function< void()> > & GetMainTaskQueue ()
 Get MainThread Task Queue.
 

Static Public Member Functions

static std::shared_ptr< ThreadModelGet ()
 Get ThreadModel single instance.
 

Private Member Functions

void ShutDownCustomThreadPool ()
 Shutdown Custom ThreadPool.
 
void ShutDownGameThreadPool ()
 Shutdown Game ThreadPool.
 
void ShutDownRHIThreadPool ()
 Shutdown RHI ThreadPool.
 
void ClearMainThreadTaskQueue ()
 Clear task queue in main thread.
 

Private Attributes

std::shared_ptr< ThreadPoolm_CustomThreadPool
 Custom ThreadPool.
 
std::shared_ptr< ThreadPoolm_GameThreadPool
 Game ThreadPool.
 
std::shared_ptr< VulkanCmdThreadPoolm_RHIThreadPool
 RHI ThreadPool.
 
scl::thread_queue< std::function< void()> > m_MainThreadTasks
 Tasks must be done in main thread.
 

Static Private Attributes

static std::shared_ptr< ThreadModelm_ThreadModel = nullptr
 Get ThreadModel single instance.
 

Detailed Description

Wrappers of all Thread Pool.

Definition at line 29 of file ThreadModel.h.


The documentation for this class was generated from the following files: