QtTaskTree::QParallelTaskTreeRunner Class | Qt TaskTree | Qt 6.11.1
Description: A parallel task tree execution controller.

- Qt 6.11
- Qt TaskTree
- C++ Classes
- QParallelTaskTreeRunner
- Qt 6.11.1 Reference Documentation

# QtTaskTree::QParallelTaskTreeRunner Class

class QtTaskTree::QParallelTaskTreeRunner

A parallel task tree execution controller. More...

Header: | `#include <qtasktreerunner.h>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS TaskTree)` `target_link_libraries(mytarget PRIVATE Qt6::TaskTree)`
qmake: | `QT += tasktree`
Since: | Qt 6.11

- List of all members, including inherited members

## Public Functions

| QParallelTaskTreeRunner()
| ~QParallelTaskTreeRunner()
void | cancel()
bool | isRunning() const
void | reset()
void | start(const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDone callDone = QtTaskTree::CallDoneFlag::Always)

## Detailed Description

Manages parallel task tree execution. Use the start() method to execute a given recipe instantly, keeping other possibly running task trees in parallel.

See also Task Tree Runners.

## Member Function Documentation

### QParallelTaskTreeRunner::QParallelTaskTreeRunner()

Constructs a parallel task tree runner.

### `[noexcept]` QParallelTaskTreeRunner::~QParallelTaskTreeRunner()

Destroys the parallel task tree runner. All running task trees are deleted. No task trees' done handlers are called.

See also ~QTaskTree().

### void QParallelTaskTreeRunner::cancel()

Cancels all running task trees. Calls task trees' done handlers with DoneWith::Cancel. The order of task trees' cancellation is random.

### bool QParallelTaskTreeRunner::isRunning() const

Returns whether the parallel task tree runner is currently executing at least one task tree.

### void QParallelTaskTreeRunner::reset()

Resets all running task trees. No task trees' done handlers are called.

### template <typename SetupHandler = QtTaskTree::TreeSetupHandler, typename DoneHandler = QtTaskTree::TreeDoneHandler> void QParallelTaskTreeRunner::start(const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDone callDone = QtTaskTree::CallDoneFlag::Always)

Starts the recipe instantly and keeps other possibly running task trees in parallel. Calls setupHandler when new task tree is about to be started. Calls doneHandler when the task tree is finished. The doneHandler is called according to the passed callDone.