1 #include "ncbi_pch.hpp" 2 #include "SimpleThreadPool.h" 3 AddThread(CThread * thread)4void CSimpleThreadPool::AddThread( CThread *thread ) 5 { 6 m_Threads.push_back( thread ); 7 } 8 WaitAll()9void CSimpleThreadPool::WaitAll() 10 { 11 //for_each( m_Threads.begin(), m_Threads.end(), [&]( shared_ptr<CThread> thread ){ 12 for_each( m_Threads.begin(), m_Threads.end(), [&]( CThread *thread ){ 13 thread->Join(); 14 } ); 15 }