1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-513 use thread pool for jobsteps

This commit is contained in:
David Hall
2017-02-03 15:22:07 -06:00
parent d50c7c7cab
commit 55d006de1a
30 changed files with 192 additions and 125 deletions

View File

@ -767,9 +767,9 @@ void TupleUnion::run()
}
}
runners.reserve(inputs.size());
for (i = 0; i < inputs.size(); i++) {
boost::shared_ptr<boost::thread> th(new boost::thread(Runner(this, i)));
runners.push_back(th);
runners.push_back(jobstepThreadPool.invoke(Runner(this, i)));
}
}
@ -784,8 +784,7 @@ void TupleUnion::join()
joinRan = true;
lk.unlock();
for (i = 0; i < runners.size(); i++)
runners[i]->join();
jobstepThreadPool.join(runners);
runners.clear();
uniquer->clear();
rowMemory.clear();