SpiecsEngine
 
Loading...
Searching...
No Matches

◆ SubmitThreadTask_LightWeight_ForEach()

template<typename ... Params>
void Spices::ThreadPool_Basic< Params >::SubmitThreadTask_LightWeight_ForEach ( std::function< void(Params...)> func)
inlineinherited

Submit a task to all thread.

Definition at line 560 of file ThreadPoolBasic.h.

561 {
563
564 {
565 std::unique_lock<std::mutex> lock(m_Mutex);
566
567 for (auto& pair : m_Threads)
568 {
569 pair.second->ReceiveThreadTask(func);
570 }
571 }
572
573 m_NotEmpty.notify_all();
574 }
#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.