TaskTree

From Qt Wiki
Jump to navigation Jump to search


Qt Task Tree - generic solution for automatic management of asynchronous tasks (C++), by Jarek Kobus

TaskTree automatically manages a chain (or a tree) of asynchronous tasks of mixed types, including running processes, network queries, functions in separate threads, animations, timers, and so on... It's easily extensible with any other types of asynchronous tasks.

The recipe on how to create, run and manage the conglomerate of tasks is described in a declarative way in C++.

The recipes are enclosed in copyable value-type objects and may be run many times, or be part of more general recipes.

The TaskTree is broadly used in QtCreator, for executing Build / Deploy / Run configurations, Locator filter, Clang tool, VCS commands, Autotests, driving Axivion plugin's communication and much more...

The TaskTree will be included in Qt 6.11 as a new QtTaskTree module.

Notes from the presentation/discussion at Qt Contributors Summit 2023: TaskTree CS23

Notes from the presentation/discussion at Qt Contributors Summit 2024: QtCS2024 TaskTree

More Info

Content Link Additional Info
Documentation https://doc-snapshots.qt.io/qt6-dev/qttasktree-index.html Ref docs: https://doc-snapshots.qt.io/qt6-dev/tasktree-module.html
Sources https://code.qt.io/cgit/qt/qttasktree.git/
Autotests https://code.qt.io/cgit/qt/qttasktree.git/tree/tests/auto/tasktree Includes more than 250 test cases
Demo https://doc-snapshots.qt.io/qt6-dev/qttasktree-widgets-demo-example.html Sources: https://code.qt.io/cgit/qt/qttasktree.git/tree/examples/widgets/demo
DataExchange [Soon to come...] An example of a reusable TaskTree recipe
TrafficLight https://doc-snapshots.qt.io/qt6-dev/qttasktree-widgets-trafficlight-example.html An alternative implementation of https://doc.qt.io/qt-6/qtscxml-trafficlight-widgets-static-example.html using TaskTree
ImageScaling [Soon to come...] An alternative implementation of https://doc.qt.io/qt-6/qtconcurrent-imagescaling-example.html using TaskTree
ImageScaling diff https://codereview.qt-project.org/c/qt-creator/qt-creator/+/481573 Difference in the implementation of the ImageScaling example using QFuture::then() and TaskTree
AssetDownloader https://codereview.qt-project.org/c/qt/qtbase/+/565933 Patch replacing the old implementation of the asset downloader with TaskTree employed (TaskTree used in Qt 6.8 privately)
Suggestions https://bugreports.qt.io/issues/?jql=project%20%3D%20QTBUG%20AND%20component%20%3D%20%22Task%20Tree%22
Presentation '24 https://qt-wiki-uploads.s3.amazonaws.com/images/5/56/TaskTreePresentation.pdf
The first public TaskTree presentation on Sep 28th 2023 at Felgo office, Vienna.
TaskTree presentation in Technopark Pomerania at the invitation of Spyrosoft on Oct 18th 2023.