forked from qt-creator/qt-creator
TaskTree: Get rid of Storage subclass of GroupItem
Make the c'tor of the GroupItem taking the TreeStorageBase public instead. This addresses the 20th point in the master task below. Task-number: QTCREATORBUG-28741 Change-Id: I78320ec24b4e4b915ab549135fb93b45c658b9f2 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -153,6 +153,10 @@ public:
|
|||||||
// Called when group done, before group's storages are deleted
|
// Called when group done, before group's storages are deleted
|
||||||
using GroupDoneHandler = std::function<DoneResult(DoneWith)>;
|
using GroupDoneHandler = std::function<DoneResult(DoneWith)>;
|
||||||
|
|
||||||
|
GroupItem(const TreeStorageBase &storage)
|
||||||
|
: m_type(Type::Storage)
|
||||||
|
, m_storageList{storage} {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Internal, provided by CustomTask
|
// Internal, provided by CustomTask
|
||||||
using InterfaceCreateHandler = std::function<TaskInterface *(void)>;
|
using InterfaceCreateHandler = std::function<TaskInterface *(void)>;
|
||||||
@@ -193,9 +197,6 @@ protected:
|
|||||||
GroupItem(const GroupData &data)
|
GroupItem(const GroupData &data)
|
||||||
: m_type(Type::GroupData)
|
: m_type(Type::GroupData)
|
||||||
, m_groupData(data) {}
|
, m_groupData(data) {}
|
||||||
GroupItem(const TreeStorageBase &storage)
|
|
||||||
: m_type(Type::Storage)
|
|
||||||
, m_storageList{storage} {}
|
|
||||||
GroupItem(const TaskHandler &handler)
|
GroupItem(const TaskHandler &handler)
|
||||||
: m_type(Type::TaskHandler)
|
: m_type(Type::TaskHandler)
|
||||||
, m_taskHandler(handler) {}
|
, m_taskHandler(handler) {}
|
||||||
@@ -328,12 +329,6 @@ TASKING_EXPORT extern const GroupItem stopOnSuccessOrError;
|
|||||||
TASKING_EXPORT extern const GroupItem finishAllAndSuccess;
|
TASKING_EXPORT extern const GroupItem finishAllAndSuccess;
|
||||||
TASKING_EXPORT extern const GroupItem finishAllAndError;
|
TASKING_EXPORT extern const GroupItem finishAllAndError;
|
||||||
|
|
||||||
class TASKING_EXPORT Storage final : public GroupItem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Storage(const TreeStorageBase &storage) : GroupItem(storage) { }
|
|
||||||
};
|
|
||||||
|
|
||||||
// Synchronous invocation. Similarly to Group - isn't counted as a task inside taskCount()
|
// Synchronous invocation. Similarly to Group - isn't counted as a task inside taskCount()
|
||||||
class TASKING_EXPORT Sync final : public GroupItem
|
class TASKING_EXPORT Sync final : public GroupItem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -344,9 +344,9 @@ static Group interDeviceTransferTask(const FilePath &source, const FilePath &des
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(writerReadyBarrier),
|
writerReadyBarrier,
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
storage,
|
||||||
FileStreamWriterTask(onWriterSetup),
|
FileStreamWriterTask(onWriterSetup),
|
||||||
Group {
|
Group {
|
||||||
waitForBarrierTask(writerReadyBarrier),
|
waitForBarrierTask(writerReadyBarrier),
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ void AndroidSdkDownloader::downloadAndExtractSdk()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
NetworkQueryTask(onQuerySetup, onQueryDone),
|
NetworkQueryTask(onQuerySetup, onQueryDone),
|
||||||
UnarchiverTask(onUnarchiveSetup, onUnarchiverDone)
|
UnarchiverTask(onUnarchiveSetup, onUnarchiverDone)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ void TestRunner::runTestsHelper()
|
|||||||
};
|
};
|
||||||
const Group group {
|
const Group group {
|
||||||
finishAllAndSuccess,
|
finishAllAndSuccess,
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
onGroupSetup(onSetup),
|
onGroupSetup(onSetup),
|
||||||
ProcessTask(onProcessSetup, onProcessDone)
|
ProcessTask(onProcessSetup, onProcessDone)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ static LocatorMatcherTask currentDocumentMatcher()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(resultStorage),
|
resultStorage,
|
||||||
CurrentDocumentSymbolsRequestTask(onQuerySetup, onQueryDone, CallDoneIf::Success),
|
CurrentDocumentSymbolsRequestTask(onQuerySetup, onQueryDone, CallDoneIf::Success),
|
||||||
AsyncTask<void>(onFilterSetup)
|
AsyncTask<void>(onFilterSetup)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -824,7 +824,7 @@ Group ClangTool::runRecipe(const RunSettings &runSettings,
|
|||||||
};
|
};
|
||||||
|
|
||||||
topTasks.append(Group {
|
topTasks.append(Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
TaskTreeTask(onTreeSetup, onTreeDone, CallDoneIf::Success)
|
TaskTreeTask(onTreeSetup, onTreeDone, CallDoneIf::Success)
|
||||||
});
|
});
|
||||||
return {topTasks};
|
return {topTasks};
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ GroupItem clangToolTask(const AnalyzeInputData &input,
|
|||||||
|
|
||||||
const Group group {
|
const Group group {
|
||||||
finishAllAndSuccess,
|
finishAllAndSuccess,
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
onGroupSetup(onSetup),
|
onGroupSetup(onSetup),
|
||||||
Group {
|
Group {
|
||||||
sequential,
|
sequential,
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ void LocatorMatcher::start()
|
|||||||
const auto storage = task.storage;
|
const auto storage = task.storage;
|
||||||
const Group group {
|
const Group group {
|
||||||
finishAllAndSuccess,
|
finishAllAndSuccess,
|
||||||
Storage(storage),
|
storage,
|
||||||
onGroupSetup(onSetup(storage, index)),
|
onGroupSetup(onSetup(storage, index)),
|
||||||
onGroupDone([storage] { storage->finalize(); }),
|
onGroupDone([storage] { storage->finalize(); }),
|
||||||
task.task
|
task.task
|
||||||
@@ -473,7 +473,7 @@ void LocatorMatcher::start()
|
|||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(collectorStorage),
|
collectorStorage,
|
||||||
ResultsCollectorTask(onCollectorSetup, onCollectorDone),
|
ResultsCollectorTask(onCollectorSetup, onCollectorDone),
|
||||||
Group {
|
Group {
|
||||||
parallelTasks
|
parallelTasks
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ void CppProjectUpdater::update(const ProjectUpdateInfo &projectUpdateInfo,
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
Group(tasks),
|
Group(tasks),
|
||||||
onGroupDone(onDone)
|
onGroupDone(onDone)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ DiffFilesController::DiffFilesController(IDocument *document)
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root = {
|
const Group root = {
|
||||||
Storage(storage),
|
storage,
|
||||||
TaskTreeTask(onTreeSetup, onTreeDone)
|
TaskTreeTask(onTreeSetup, onTreeDone)
|
||||||
};
|
};
|
||||||
setReloadRecipe(root);
|
setReloadRecipe(root);
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ TaskTree *BranchView::onFastForwardMerge(const std::function<void()> &callback)
|
|||||||
});
|
});
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
ProcessTask(onMergeBaseSetup, onMergeBaseDone, CallDoneIf::Success),
|
ProcessTask(onMergeBaseSetup, onMergeBaseDone, CallDoneIf::Success),
|
||||||
topRevisionProc,
|
topRevisionProc,
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ GitDiffEditorController::GitDiffEditorController(IDocument *document,
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(diffInputStorage),
|
diffInputStorage,
|
||||||
ProcessTask(onDiffSetup, onDiffDone, CallDoneIf::Success),
|
ProcessTask(onDiffSetup, onDiffDone, CallDoneIf::Success),
|
||||||
postProcessTask(diffInputStorage)
|
postProcessTask(diffInputStorage)
|
||||||
};
|
};
|
||||||
@@ -333,8 +333,8 @@ FileListDiffController::FileListDiffController(IDocument *document, const QStrin
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
Tasking::Storage(diffInputStorage),
|
diffInputStorage,
|
||||||
Group {
|
Group {
|
||||||
parallel,
|
parallel,
|
||||||
continueOnSuccess,
|
continueOnSuccess,
|
||||||
@@ -527,8 +527,8 @@ ShowController::ShowController(IDocument *document, const QString &id)
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
Tasking::Storage(diffInputStorage),
|
diffInputStorage,
|
||||||
parallel,
|
parallel,
|
||||||
onGroupSetup([this] { setStartupFile(VcsBase::source(this->document()).toString()); }),
|
onGroupSetup([this] { setStartupFile(VcsBase::source(this->document()).toString()); }),
|
||||||
Group {
|
Group {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ LocatorMatcherTask locatorMatcher(Client *client, int maxResultCount,
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(resultStorage),
|
resultStorage,
|
||||||
ClientWorkspaceSymbolRequestTask(onQuerySetup, onQueryDone, CallDoneIf::Success),
|
ClientWorkspaceSymbolRequestTask(onQuerySetup, onQueryDone, CallDoneIf::Success),
|
||||||
AsyncTask<void>(onFilterSetup)
|
AsyncTask<void>(onFilterSetup)
|
||||||
};
|
};
|
||||||
@@ -135,7 +135,7 @@ LocatorMatcherTask currentDocumentMatcher()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(resultStorage),
|
resultStorage,
|
||||||
CurrentDocumentSymbolsRequestTask(onQuerySetup, onQueryDone, CallDoneIf::Success),
|
CurrentDocumentSymbolsRequestTask(onQuerySetup, onQueryDone, CallDoneIf::Success),
|
||||||
AsyncTask<void>(onFilterSetup)
|
AsyncTask<void>(onFilterSetup)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ MercurialDiffEditorController::MercurialDiffEditorController(IDocument *document
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(diffInputStorage),
|
diffInputStorage,
|
||||||
ProcessTask(onDiffSetup, onDiffDone, CallDoneIf::Success),
|
ProcessTask(onDiffSetup, onDiffDone, CallDoneIf::Success),
|
||||||
postProcessTask(diffInputStorage)
|
postProcessTask(diffInputStorage)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ GroupItem GenericDeployStep::deployRecipe()
|
|||||||
};
|
};
|
||||||
|
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
onGroupSetup(onSetup),
|
onGroupSetup(onSetup),
|
||||||
mkdirTask(storage),
|
mkdirTask(storage),
|
||||||
transferTask(storage)
|
transferTask(storage)
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ GroupItem GenericDirectUploadStep::deployRecipe()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
onGroupSetup(setupHandler),
|
onGroupSetup(setupHandler),
|
||||||
statTree(storage, preFilesToStat, preStatEndHandler),
|
statTree(storage, preFilesToStat, preStatEndHandler),
|
||||||
uploadTask(storage),
|
uploadTask(storage),
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ GroupItem GenericLinuxDeviceTesterPrivate::transferTasks() const
|
|||||||
TreeStorage<TransferStorage> storage;
|
TreeStorage<TransferStorage> storage;
|
||||||
return Group {
|
return Group {
|
||||||
continueOnSuccess,
|
continueOnSuccess,
|
||||||
Tasking::Storage(storage),
|
storage,
|
||||||
transferTask(FileTransferMethod::GenericCopy, storage),
|
transferTask(FileTransferMethod::GenericCopy, storage),
|
||||||
transferTask(FileTransferMethod::Sftp, storage),
|
transferTask(FileTransferMethod::Sftp, storage),
|
||||||
transferTask(FileTransferMethod::Rsync, storage),
|
transferTask(FileTransferMethod::Rsync, storage),
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ SubversionDiffEditorController::SubversionDiffEditorController(IDocument *docume
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Tasking::Storage(diffInputStorage),
|
diffInputStorage,
|
||||||
parallel,
|
parallel,
|
||||||
Group {
|
Group {
|
||||||
finishAllAndSuccess,
|
finishAllAndSuccess,
|
||||||
|
|||||||
@@ -196,8 +196,8 @@ Group ValgrindProcessPrivate::runRecipe() const
|
|||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(xmlBarrier),
|
xmlBarrier,
|
||||||
onGroupSetup(onSetup),
|
onGroupSetup(onSetup),
|
||||||
ProcessTask(onProcessSetup),
|
ProcessTask(onProcessSetup),
|
||||||
Group {
|
Group {
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ TestData createTestData(const QList<ResultType> &expectedResults, Function &&fun
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
ConcurrentCallTask<ResultType>(onSetup, onDone)
|
ConcurrentCallTask<ResultType>(onSetup, onDone)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -208,8 +208,8 @@ void tst_ConcurrentCall::taskTree_data()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(internalStorage),
|
internalStorage,
|
||||||
onGroupSetup([internalStorage] { *internalStorage = 1; }),
|
onGroupSetup([internalStorage] { *internalStorage = 1; }),
|
||||||
ConcurrentCallTask<int>(onSetup, onDone, CallDoneIf::Success),
|
ConcurrentCallTask<int>(onSetup, onDone, CallDoneIf::Success),
|
||||||
ConcurrentCallTask<int>(onSetup, onDone, CallDoneIf::Success),
|
ConcurrentCallTask<int>(onSetup, onDone, CallDoneIf::Success),
|
||||||
|
|||||||
@@ -261,8 +261,8 @@ void tst_Tasking::runtimeCheck()
|
|||||||
const TreeStorage<int> storage;
|
const TreeStorage<int> storage;
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(storage),
|
storage,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,8 +274,8 @@ void tst_Tasking::runtimeCheck()
|
|||||||
const auto storage2 = storage1;
|
const auto storage2 = storage1;
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
Storage(storage1),
|
storage1,
|
||||||
Storage(storage2),
|
storage2,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,20 +431,20 @@ static TestData storageShadowingData()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(helperStorage),
|
helperStorage,
|
||||||
Storage(shadowedStorage),
|
shadowedStorage,
|
||||||
groupSetupWithStorage(1),
|
groupSetupWithStorage(1),
|
||||||
Group {
|
Group {
|
||||||
Storage(shadowedStorage),
|
shadowedStorage,
|
||||||
groupSetupWithStorage(2),
|
groupSetupWithStorage(2),
|
||||||
Group {
|
Group {
|
||||||
Storage(shadowedStorage),
|
shadowedStorage,
|
||||||
groupSetupWithStorage(3),
|
groupSetupWithStorage(3),
|
||||||
groupDoneWithStorage(3)
|
groupDoneWithStorage(3)
|
||||||
},
|
},
|
||||||
Group {
|
Group {
|
||||||
Storage(shadowedStorage),
|
shadowedStorage,
|
||||||
groupSetupWithStorage(4),
|
groupSetupWithStorage(4),
|
||||||
groupDoneWithStorage(4)
|
groupDoneWithStorage(4)
|
||||||
},
|
},
|
||||||
@@ -508,7 +508,7 @@ static TestData parallelData()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
createSuccessTask(2),
|
createSuccessTask(2),
|
||||||
@@ -627,21 +627,21 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root1 {
|
const Group root1 {
|
||||||
Storage(storage),
|
storage,
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
};
|
};
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
Storage(storage),
|
storage,
|
||||||
onGroupSetup([] { return SetupResult::Continue; }),
|
onGroupSetup([] { return SetupResult::Continue; }),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
};
|
};
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
Storage(storage),
|
storage,
|
||||||
onGroupSetup([] { return SetupResult::StopWithSuccess; }),
|
onGroupSetup([] { return SetupResult::StopWithSuccess; }),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
};
|
};
|
||||||
const Group root4 {
|
const Group root4 {
|
||||||
Storage(storage),
|
storage,
|
||||||
onGroupSetup([] { return SetupResult::StopWithError; }),
|
onGroupSetup([] { return SetupResult::StopWithError; }),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
};
|
};
|
||||||
@@ -658,7 +658,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const auto setupGroup = [=](SetupResult setupResult, WorkflowPolicy policy) {
|
const auto setupGroup = [=](SetupResult setupResult, WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
onGroupSetup([setupResult] { return setupResult; }),
|
onGroupSetup([setupResult] { return setupResult; }),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
@@ -693,7 +693,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createTaskWithSetupTweak(1, SetupResult::StopWithSuccess),
|
createTaskWithSetupTweak(1, SetupResult::StopWithSuccess),
|
||||||
createTaskWithSetupTweak(2, SetupResult::StopWithSuccess)
|
createTaskWithSetupTweak(2, SetupResult::StopWithSuccess)
|
||||||
};
|
};
|
||||||
@@ -708,7 +708,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createTaskWithSetupTweak(1, SetupResult::StopWithError),
|
createTaskWithSetupTweak(1, SetupResult::StopWithError),
|
||||||
createTaskWithSetupTweak(2, SetupResult::StopWithError)
|
createTaskWithSetupTweak(2, SetupResult::StopWithError)
|
||||||
};
|
};
|
||||||
@@ -721,7 +721,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createTaskWithSetupTweak(1, SetupResult::Continue),
|
createTaskWithSetupTweak(1, SetupResult::Continue),
|
||||||
createTaskWithSetupTweak(2, SetupResult::Continue),
|
createTaskWithSetupTweak(2, SetupResult::Continue),
|
||||||
createTaskWithSetupTweak(3, SetupResult::StopWithError),
|
createTaskWithSetupTweak(3, SetupResult::StopWithError),
|
||||||
@@ -743,7 +743,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
storage,
|
||||||
createTaskWithSetupTweak(1, SetupResult::Continue),
|
createTaskWithSetupTweak(1, SetupResult::Continue),
|
||||||
createTaskWithSetupTweak(2, SetupResult::Continue),
|
createTaskWithSetupTweak(2, SetupResult::Continue),
|
||||||
createTaskWithSetupTweak(3, SetupResult::StopWithError),
|
createTaskWithSetupTweak(3, SetupResult::StopWithError),
|
||||||
@@ -765,7 +765,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
storage,
|
||||||
createTaskWithSetupTweak(1, SetupResult::Continue),
|
createTaskWithSetupTweak(1, SetupResult::Continue),
|
||||||
createTaskWithSetupTweak(2, SetupResult::Continue),
|
createTaskWithSetupTweak(2, SetupResult::Continue),
|
||||||
Group {
|
Group {
|
||||||
@@ -789,7 +789,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallel,
|
parallel,
|
||||||
Storage(storage),
|
storage,
|
||||||
createTaskWithSetupTweak(1, SetupResult::Continue),
|
createTaskWithSetupTweak(1, SetupResult::Continue),
|
||||||
createTaskWithSetupTweak(2, SetupResult::Continue),
|
createTaskWithSetupTweak(2, SetupResult::Continue),
|
||||||
Group {
|
Group {
|
||||||
@@ -814,7 +814,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
Group {
|
Group {
|
||||||
Group {
|
Group {
|
||||||
@@ -861,7 +861,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
auto setupSubTree = [storage, createSuccessTask](TaskTree &taskTree) {
|
auto setupSubTree = [storage, createSuccessTask](TaskTree &taskTree) {
|
||||||
const Group nestedRoot {
|
const Group nestedRoot {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSuccessTask(2),
|
createSuccessTask(2),
|
||||||
createSuccessTask(3),
|
createSuccessTask(3),
|
||||||
createSuccessTask(4)
|
createSuccessTask(4)
|
||||||
@@ -874,7 +874,7 @@ void tst_Tasking::testTree_data()
|
|||||||
taskTree.onStorageDone(storage, collectSubLog);
|
taskTree.onStorageDone(storage, collectSubLog);
|
||||||
};
|
};
|
||||||
const Group root1 {
|
const Group root1 {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
createSuccessTask(2),
|
createSuccessTask(2),
|
||||||
createSuccessTask(3),
|
createSuccessTask(3),
|
||||||
@@ -883,7 +883,7 @@ void tst_Tasking::testTree_data()
|
|||||||
groupDone(0)
|
groupDone(0)
|
||||||
};
|
};
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group { createSuccessTask(1) },
|
Group { createSuccessTask(1) },
|
||||||
Group { createSuccessTask(2) },
|
Group { createSuccessTask(2) },
|
||||||
Group { createSuccessTask(3) },
|
Group { createSuccessTask(3) },
|
||||||
@@ -892,7 +892,7 @@ void tst_Tasking::testTree_data()
|
|||||||
groupDone(0)
|
groupDone(0)
|
||||||
};
|
};
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
TaskTreeTask(setupSubTree),
|
TaskTreeTask(setupSubTree),
|
||||||
createSuccessTask(5),
|
createSuccessTask(5),
|
||||||
@@ -919,7 +919,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
Group {
|
Group {
|
||||||
@@ -965,7 +965,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
createSuccessTask(2),
|
createSuccessTask(2),
|
||||||
createFailingTask(3),
|
createFailingTask(3),
|
||||||
@@ -988,7 +988,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const auto createRoot = [storage, groupDone](WorkflowPolicy policy) {
|
const auto createRoot = [storage, groupDone](WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
};
|
};
|
||||||
@@ -1030,7 +1030,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, groupDone](
|
const auto createRoot = [storage, createSuccessTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
@@ -1082,7 +1082,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createFailingTask, groupDone](
|
const auto createRoot = [storage, createFailingTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
createFailingTask(1),
|
createFailingTask(1),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
@@ -1137,7 +1137,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
createFailingTask(1, 1ms),
|
createFailingTask(1, 1ms),
|
||||||
@@ -1207,7 +1207,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
@@ -1293,7 +1293,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
Group {
|
Group {
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
@@ -1352,7 +1352,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
Group {
|
Group {
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
@@ -1423,7 +1423,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
Group {
|
Group {
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
@@ -1490,7 +1490,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
const auto createRoot = [storage, createSuccessTask, createFailingTask, groupDone](
|
||||||
WorkflowPolicy policy) {
|
WorkflowPolicy policy) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
workflowPolicy(policy),
|
workflowPolicy(policy),
|
||||||
createSuccessTask(1),
|
createSuccessTask(1),
|
||||||
createFailingTask(2),
|
createFailingTask(2),
|
||||||
@@ -1562,7 +1562,7 @@ void tst_Tasking::testTree_data()
|
|||||||
return Group {
|
return Group {
|
||||||
parallel,
|
parallel,
|
||||||
stopOnSuccessOrError,
|
stopOnSuccessOrError,
|
||||||
Storage(storage),
|
storage,
|
||||||
createTask(1, firstResult, 1000ms),
|
createTask(1, firstResult, 1000ms),
|
||||||
createTask(2, secondResult, 1ms),
|
createTask(2, secondResult, 1ms),
|
||||||
groupDone(0)
|
groupDone(0)
|
||||||
@@ -1604,7 +1604,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, groupDone, groupSetupWithTweak](
|
const auto createRoot = [storage, createSuccessTask, groupDone, groupSetupWithTweak](
|
||||||
SetupResult desiredResult) {
|
SetupResult desiredResult) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetupWithTweak(1, desiredResult),
|
groupSetupWithTweak(1, desiredResult),
|
||||||
createSuccessTask(1)
|
createSuccessTask(1)
|
||||||
@@ -1648,7 +1648,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createTask, groupDone, groupDoneWithTweak](
|
const auto createRoot = [storage, createTask, groupDone, groupDoneWithTweak](
|
||||||
DoneResult firstResult, DoneResult secondResult) {
|
DoneResult firstResult, DoneResult secondResult) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
createTask(1, firstResult),
|
createTask(1, firstResult),
|
||||||
groupDoneWithTweak(1, secondResult)
|
groupDoneWithTweak(1, secondResult)
|
||||||
@@ -1707,7 +1707,7 @@ void tst_Tasking::testTree_data()
|
|||||||
const auto createRoot = [storage, createSuccessTask, groupDone, createTaskWithSetupTweak](
|
const auto createRoot = [storage, createSuccessTask, groupDone, createTaskWithSetupTweak](
|
||||||
SetupResult desiredResult) {
|
SetupResult desiredResult) {
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
createTaskWithSetupTweak(1, desiredResult),
|
createTaskWithSetupTweak(1, desiredResult),
|
||||||
createSuccessTask(2)
|
createSuccessTask(2)
|
||||||
@@ -1752,7 +1752,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(1),
|
groupSetup(1),
|
||||||
createSuccessTask(1)
|
createSuccessTask(1)
|
||||||
@@ -1790,7 +1790,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(1),
|
groupSetup(1),
|
||||||
createSuccessTask(1)
|
createSuccessTask(1)
|
||||||
@@ -1835,7 +1835,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root1 {
|
const Group root1 {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(1),
|
groupSetup(1),
|
||||||
createSuccessTask(1)
|
createSuccessTask(1)
|
||||||
@@ -1875,7 +1875,7 @@ void tst_Tasking::testTree_data()
|
|||||||
// - tasks 4 and 5 should be skipped
|
// - tasks 4 and 5 should be skipped
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(1),
|
groupSetup(1),
|
||||||
createSuccessTask(1, 10ms)
|
createSuccessTask(1, 10ms)
|
||||||
@@ -1919,7 +1919,7 @@ void tst_Tasking::testTree_data()
|
|||||||
// - task 5 should be started (because of root's continueOnError policy)
|
// - task 5 should be started (because of root's continueOnError policy)
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
continueOnError,
|
continueOnError,
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Group {
|
Group {
|
||||||
@@ -1969,7 +1969,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(1),
|
groupSetup(1),
|
||||||
Group {
|
Group {
|
||||||
@@ -2019,7 +2019,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(1),
|
groupSetup(1),
|
||||||
Group { createSuccessTask(1) }
|
Group { createSuccessTask(1) }
|
||||||
@@ -2065,7 +2065,7 @@ void tst_Tasking::testTree_data()
|
|||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
parallelLimit(2),
|
parallelLimit(2),
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(1),
|
groupSetup(1),
|
||||||
Group { createSuccessTask(1) }
|
Group { createSuccessTask(1) }
|
||||||
@@ -2104,7 +2104,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSync(1),
|
createSync(1),
|
||||||
createSync(2),
|
createSync(2),
|
||||||
createSync(3),
|
createSync(3),
|
||||||
@@ -2123,7 +2123,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSyncWithTweak(1, DoneResult::Success),
|
createSyncWithTweak(1, DoneResult::Success),
|
||||||
createSyncWithTweak(2, DoneResult::Success),
|
createSyncWithTweak(2, DoneResult::Success),
|
||||||
createSyncWithTweak(3, DoneResult::Success),
|
createSyncWithTweak(3, DoneResult::Success),
|
||||||
@@ -2147,7 +2147,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
createSync(1),
|
createSync(1),
|
||||||
createSync(2),
|
createSync(2),
|
||||||
@@ -2167,7 +2167,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
parallel,
|
parallel,
|
||||||
createSync(1),
|
createSync(1),
|
||||||
createSync(2),
|
createSync(2),
|
||||||
@@ -2186,7 +2186,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSync(1),
|
createSync(1),
|
||||||
createSuccessTask(2),
|
createSuccessTask(2),
|
||||||
createSync(3),
|
createSync(3),
|
||||||
@@ -2209,7 +2209,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
{
|
{
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
createSync(1),
|
createSync(1),
|
||||||
createSuccessTask(2),
|
createSuccessTask(2),
|
||||||
createSyncWithTweak(3, DoneResult::Error),
|
createSyncWithTweak(3, DoneResult::Error),
|
||||||
@@ -2235,8 +2235,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// setupBarrierAdvance, placed BEFORE the group containing the waitFor() element
|
// setupBarrierAdvance, placed BEFORE the group containing the waitFor() element
|
||||||
// in the tree order, works OK in SEQUENTIAL mode.
|
// in the tree order, works OK in SEQUENTIAL mode.
|
||||||
const Group root1 {
|
const Group root1 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
sequential,
|
sequential,
|
||||||
createBarrierAdvance(storage, barrier, 1),
|
createBarrierAdvance(storage, barrier, 1),
|
||||||
Group {
|
Group {
|
||||||
@@ -2260,8 +2260,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// setupTaskWithCondition, placed BEFORE the group containing the waitFor() element
|
// setupTaskWithCondition, placed BEFORE the group containing the waitFor() element
|
||||||
// in the tree order, works OK in PARALLEL mode.
|
// in the tree order, works OK in PARALLEL mode.
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
parallel,
|
parallel,
|
||||||
createBarrierAdvance(storage, barrier, 1),
|
createBarrierAdvance(storage, barrier, 1),
|
||||||
Group {
|
Group {
|
||||||
@@ -2292,8 +2292,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// come from the not yet started next task, causing a deadlock.
|
// come from the not yet started next task, causing a deadlock.
|
||||||
// The minimal requirement for this scenario to succeed is to set parallelLimit(2) or more.
|
// The minimal requirement for this scenario to succeed is to set parallelLimit(2) or more.
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
parallel,
|
parallel,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(2),
|
groupSetup(2),
|
||||||
@@ -2317,8 +2317,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// setupBarrierAdvance, placed BEFORE the groups containing the waitFor() element
|
// setupBarrierAdvance, placed BEFORE the groups containing the waitFor() element
|
||||||
// in the tree order, wakes both waitFor tasks.
|
// in the tree order, wakes both waitFor tasks.
|
||||||
const Group root4 {
|
const Group root4 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
parallel,
|
parallel,
|
||||||
createBarrierAdvance(storage, barrier, 1),
|
createBarrierAdvance(storage, barrier, 1),
|
||||||
Group {
|
Group {
|
||||||
@@ -2348,9 +2348,9 @@ void tst_Tasking::testTree_data()
|
|||||||
SingleBarrier barrier2;
|
SingleBarrier barrier2;
|
||||||
|
|
||||||
const Group root5 {
|
const Group root5 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
Storage(barrier2),
|
barrier2,
|
||||||
parallel,
|
parallel,
|
||||||
createBarrierAdvance(storage, barrier, 1),
|
createBarrierAdvance(storage, barrier, 1),
|
||||||
createBarrierAdvance(storage, barrier2, 2),
|
createBarrierAdvance(storage, barrier2, 2),
|
||||||
@@ -2394,8 +2394,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// setupBarrierAdvance, placed BEFORE the group containing the waitFor() element
|
// setupBarrierAdvance, placed BEFORE the group containing the waitFor() element
|
||||||
// in the tree order, works OK in SEQUENTIAL mode.
|
// in the tree order, works OK in SEQUENTIAL mode.
|
||||||
const Group root1 {
|
const Group root1 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
sequential,
|
sequential,
|
||||||
createBarrierAdvance(storage, barrier, 1),
|
createBarrierAdvance(storage, barrier, 1),
|
||||||
createBarrierAdvance(storage, barrier, 2),
|
createBarrierAdvance(storage, barrier, 2),
|
||||||
@@ -2422,8 +2422,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// setupBarrierAdvance, placed BEFORE the group containing the waitFor() element
|
// setupBarrierAdvance, placed BEFORE the group containing the waitFor() element
|
||||||
// in the tree order, works OK in PARALLEL mode.
|
// in the tree order, works OK in PARALLEL mode.
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
parallel,
|
parallel,
|
||||||
createBarrierAdvance(storage, barrier, 1),
|
createBarrierAdvance(storage, barrier, 1),
|
||||||
createBarrierAdvance(storage, barrier, 2),
|
createBarrierAdvance(storage, barrier, 2),
|
||||||
@@ -2457,8 +2457,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// come from the not yet started next task, causing a deadlock.
|
// come from the not yet started next task, causing a deadlock.
|
||||||
// The minimal requirement for this scenario to succeed is to set parallelLimit(2) or more.
|
// The minimal requirement for this scenario to succeed is to set parallelLimit(2) or more.
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
parallel,
|
parallel,
|
||||||
Group {
|
Group {
|
||||||
groupSetup(2),
|
groupSetup(2),
|
||||||
@@ -2485,8 +2485,8 @@ void tst_Tasking::testTree_data()
|
|||||||
// setupBarrierAdvance, placed BEFORE the groups containing the waitFor() element
|
// setupBarrierAdvance, placed BEFORE the groups containing the waitFor() element
|
||||||
// in the tree order, wakes both waitFor tasks.
|
// in the tree order, wakes both waitFor tasks.
|
||||||
const Group root4 {
|
const Group root4 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Storage(barrier),
|
barrier,
|
||||||
parallel,
|
parallel,
|
||||||
createBarrierAdvance(storage, barrier, 1),
|
createBarrierAdvance(storage, barrier, 1),
|
||||||
createBarrierAdvance(storage, barrier, 2),
|
createBarrierAdvance(storage, barrier, 2),
|
||||||
@@ -2530,7 +2530,7 @@ void tst_Tasking::testTree_data()
|
|||||||
// 1. When the timeout has triggered or not.
|
// 1. When the timeout has triggered or not.
|
||||||
// 2. With and without timeout handler.
|
// 2. With and without timeout handler.
|
||||||
const Group root1 {
|
const Group root1 {
|
||||||
Storage(storage),
|
storage,
|
||||||
TestTask(setupTask(1, 1000ms), setupDone(1))
|
TestTask(setupTask(1, 1000ms), setupDone(1))
|
||||||
.withTimeout(1ms)
|
.withTimeout(1ms)
|
||||||
};
|
};
|
||||||
@@ -2542,7 +2542,7 @@ void tst_Tasking::testTree_data()
|
|||||||
DoneWith::Error};
|
DoneWith::Error};
|
||||||
|
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
Storage(storage),
|
storage,
|
||||||
TestTask(setupTask(1, 1000ms), setupDone(1))
|
TestTask(setupTask(1, 1000ms), setupDone(1))
|
||||||
.withTimeout(1ms, setupTimeout(1))
|
.withTimeout(1ms, setupTimeout(1))
|
||||||
};
|
};
|
||||||
@@ -2555,7 +2555,7 @@ void tst_Tasking::testTree_data()
|
|||||||
DoneWith::Error};
|
DoneWith::Error};
|
||||||
|
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
Storage(storage),
|
storage,
|
||||||
TestTask(setupTask(1, 1ms), setupDone(1))
|
TestTask(setupTask(1, 1ms), setupDone(1))
|
||||||
.withTimeout(1000ms)
|
.withTimeout(1000ms)
|
||||||
};
|
};
|
||||||
@@ -2567,7 +2567,7 @@ void tst_Tasking::testTree_data()
|
|||||||
DoneWith::Success};
|
DoneWith::Success};
|
||||||
|
|
||||||
const Group root4 {
|
const Group root4 {
|
||||||
Storage(storage),
|
storage,
|
||||||
TestTask(setupTask(1, 1ms), setupDone(1))
|
TestTask(setupTask(1, 1ms), setupDone(1))
|
||||||
.withTimeout(1000ms, setupTimeout(1))
|
.withTimeout(1000ms, setupTimeout(1))
|
||||||
};
|
};
|
||||||
@@ -2580,7 +2580,7 @@ void tst_Tasking::testTree_data()
|
|||||||
// 1. When the timeout has triggered or not.
|
// 1. When the timeout has triggered or not.
|
||||||
// 2. With and without timeout handler.
|
// 2. With and without timeout handler.
|
||||||
const Group root1 {
|
const Group root1 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
createSuccessTask(1, 1000ms)
|
createSuccessTask(1, 1000ms)
|
||||||
}.withTimeout(1ms)
|
}.withTimeout(1ms)
|
||||||
@@ -2594,7 +2594,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
// Test Group::withTimeout(), passing custom handler
|
// Test Group::withTimeout(), passing custom handler
|
||||||
const Group root2 {
|
const Group root2 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
createSuccessTask(1, 1000ms)
|
createSuccessTask(1, 1000ms)
|
||||||
}.withTimeout(1ms, setupTimeout(1))
|
}.withTimeout(1ms, setupTimeout(1))
|
||||||
@@ -2608,7 +2608,7 @@ void tst_Tasking::testTree_data()
|
|||||||
DoneWith::Error};
|
DoneWith::Error};
|
||||||
|
|
||||||
const Group root3 {
|
const Group root3 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
createSuccessTask(1, 1ms)
|
createSuccessTask(1, 1ms)
|
||||||
}.withTimeout(1000ms)
|
}.withTimeout(1000ms)
|
||||||
@@ -2622,7 +2622,7 @@ void tst_Tasking::testTree_data()
|
|||||||
|
|
||||||
// Test Group::withTimeout(), passing custom handler
|
// Test Group::withTimeout(), passing custom handler
|
||||||
const Group root4 {
|
const Group root4 {
|
||||||
Storage(storage),
|
storage,
|
||||||
Group {
|
Group {
|
||||||
createSuccessTask(1, 1ms)
|
createSuccessTask(1, 1ms)
|
||||||
}.withTimeout(1000ms, setupTimeout(1))
|
}.withTimeout(1000ms, setupTimeout(1))
|
||||||
@@ -2749,7 +2749,7 @@ struct StorageIO
|
|||||||
static Group inputOutputRecipe(const TreeStorage<StorageIO> &storage)
|
static Group inputOutputRecipe(const TreeStorage<StorageIO> &storage)
|
||||||
{
|
{
|
||||||
return Group {
|
return Group {
|
||||||
Storage(storage),
|
storage,
|
||||||
onGroupSetup([storage] { ++storage->value; }),
|
onGroupSetup([storage] { ++storage->value; }),
|
||||||
onGroupDone([storage] { storage->value *= 2; })
|
onGroupDone([storage] { storage->value *= 2; })
|
||||||
};
|
};
|
||||||
@@ -2819,7 +2819,7 @@ void tst_Tasking::storageDestructor()
|
|||||||
taskObject = 1000ms;
|
taskObject = 1000ms;
|
||||||
};
|
};
|
||||||
const Group root {
|
const Group root {
|
||||||
Storage(storage),
|
storage,
|
||||||
TestTask(setupSleepingTask)
|
TestTask(setupSleepingTask)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ Group recipe(const Tasking::TreeStorage<ExternalData> &externalStorage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QList<GroupItem> recipe {
|
const QList<GroupItem> recipe {
|
||||||
Storage(externalStorage),
|
externalStorage,
|
||||||
Storage(internalStorage),
|
internalStorage,
|
||||||
NetworkQueryTask(onDownloadSetup, onDownloadDone),
|
NetworkQueryTask(onDownloadSetup, onDownloadDone),
|
||||||
ConcurrentCallTask<QImage>(onReadSetup, onReadDone),
|
ConcurrentCallTask<QImage>(onReadSetup, onReadDone),
|
||||||
Group { parallelTasks }
|
Group { parallelTasks }
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ void Images::process()
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Group group {
|
const Group group {
|
||||||
Storage(storage),
|
storage,
|
||||||
NetworkQueryTask(onDownloadSetup, onDownloadDone),
|
NetworkQueryTask(onDownloadSetup, onDownloadDone),
|
||||||
ConcurrentCallTask<QImage>(onScalingSetup, onScalingDone)
|
ConcurrentCallTask<QImage>(onScalingSetup, onScalingDone)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user