generalize the tasklet mechanism to an arbitrary number of worker threads

this has been quite a bit more complicated than I initially thought.
This commit is contained in:
Andreas Lauser 2018-03-15 11:05:10 +01:00
parent b39b60109d
commit ddb6ef2acb

View File

@ -115,8 +115,10 @@ public:
// create output thread if enabled and rank is I/O rank
// async output is enabled by default if pthread are enabled
bool enableAsyncOutput = EWOMS_GET_PARAM(TypeTag, bool, EnableAsyncEclOutput);
bool createOutputThread = enableAsyncOutput && collectToIORank_.isIORank();
taskletRunner_.reset(new TaskletRunner(createOutputThread));
int numWorkerThreads = 0;
if (enableAsyncOutput && collectToIORank_.isIORank())
numWorkerThreads = 1;
taskletRunner_.reset(new TaskletRunner(numWorkerThreads));
}
~EclWriter()