Wait for all tasks executed finish in taskqueue.
501 {
503
504 auto idleCond = [&]() {
506 };
507
508 if (!idleCond())
509 {
510 std::unique_lock<std::mutex> lock(
m_Mutex);
512 }
513
515 {
516 pair.second->Wait();
517 }
518 }
#define SPICES_PROFILE_ZONE
std::atomic_int m_IdleThreadSize
Idled thread size.
std::atomic_int m_Tasks
Number of tasks;.
std::mutex m_Mutex
Mutex for thread safe.
std::unordered_map< uint32_t, std::unique_ptr< Thread< Params... > > > m_Threads
Threads Container.
std::atomic_int m_NThreads
Threads Count.
std::condition_variable m_IdleCond
Thread pool thread idle Condition.