1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +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

@ -81,6 +81,7 @@ TupleConstantStep::TupleConstantStep(const JobInfo& jobInfo) :
fInputDL(NULL),
fOutputDL(NULL),
fInputIterator(0),
fRunner(0),
fEndOfResult(false)
{
fExtendedInfo = "TCS: ";
@ -290,7 +291,7 @@ void TupleConstantStep::run()
if (fOutputDL == NULL)
throw logic_error("Output is not a RowGroup data list.");
fRunner.reset(new boost::thread(Runner(this)));
fRunner = jobstepThreadPool.invoke(Runner(this));
}
}
@ -298,7 +299,7 @@ void TupleConstantStep::run()
void TupleConstantStep::join()
{
if (fRunner)
fRunner->join();
jobstepThreadPool.join(fRunner);
}