Changeset 10919 for code/branches/cpp11_v2/src/libraries/core/ThreadPool.cc
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/ThreadPool.cc
r8394 r10919 83 83 bool ThreadPool::passFunction( const ExecutorPtr& executor, bool addThread ) 84 84 { 85 std::vector<Thread*>::iterator it; 86 for ( it=this->threadPool_.begin(); it!=this->threadPool_.end(); ++it ) 85 for ( Thread* thread : threadPool_ ) 87 86 { 88 if ( ! (*it)->isWorking() )87 if ( ! thread->isWorking() ) 89 88 { 90 89 // If that fails, then there is some code error 91 OrxVerify( (*it)->evaluateExecutor( executor ), "ERROR: could not evaluate Executor" );90 OrxVerify( thread->evaluateExecutor( executor ), "ERROR: could not evaluate Executor" ); 92 91 return true; 93 92 } … … 105 104 void ThreadPool::synchronise() 106 105 { 107 std::vector<Thread*>::iterator it; 108 for ( it=this->threadPool_.begin(); it!=this->threadPool_.end(); ++it ) 106 for ( Thread* thread : this->threadPool_ ) 109 107 { 110 (*it)->waitUntilFinished();108 thread->waitUntilFinished(); 111 109 } 112 110 }
Note: See TracChangeset
for help on using the changeset viewer.