SpiecsEngine
 
Loading...
Searching...
No Matches

◆ SubmitThreadTask_LightWeight()

template<typename ... Params>
void Spices::ThreadPool_Basic< Params >::SubmitThreadTask_LightWeight ( uint32_t threadId,
std::function< void(Params...)> func )
inlineinherited

Submit a task to specific thread.

Definition at line 546 of file ThreadPoolBasic.h.

547 {
549
550 {
551 std::unique_lock<std::mutex> lock(m_Mutex);
552
553 m_Threads[threadId]->ReceiveThreadTask(func);
554 }
555
556 m_NotEmpty.notify_all();
557 }
#define SPICES_PROFILE_ZONE
std::mutex m_Mutex
Mutex for thread safe.
std::unordered_map< uint32_t, std::unique_ptr< Thread< Params... > > > m_Threads
Threads Container.
std::condition_variable m_NotEmpty
Task Queue not empty.

References Spices::ThreadPool_Basic< Params >::m_NotEmpty.