Beispiel #1
0
 void threadPoolFunction(std::pair<TaskSchedulerTBB::ThreadPool*,size_t>* pair)
 {
   TaskSchedulerTBB::ThreadPool* pool = pair->first;
   size_t threadIndex = pair->second;
   g_barrier.wait();
   pool->thread_loop(threadIndex);
 }
 void threadPoolFunction(void* ptr) try 
 {
   TaskSchedulerTBB::ThreadPool* pool = (TaskSchedulerTBB::ThreadPool*) ptr;
   pool->thread_loop();
 }
 catch (const std::exception& e) {
   std::cout << "Error: " << e.what() << std::endl; // FIXME: propagate to main thread
   exit(1);
 }