Jump to content

TaskTree: Difference between revisions

From Qt Wiki
No edit summary
No edit summary
 
(60 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Tools::QtCreator]]
[[Category:Tools::QtCreator]]


TaskTree - generic solution for automatic management of asynchronous task (C++).
==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.


TaskTree automatically manages a chain (or a tree) of asynchronous tasks of mixed types.
The recipe on how to create, run and manage the conglomerate of tasks is described in a declarative way in C++.


The recipe on how to run 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 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 is 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]]


The TaskTree is currently broadly used in QtCreator, for executing Build / Deploy configurations, Locator filter, Clang tool, Autotests, and much more...
== More Info ==
{| class="wikitable"
|-
! Link || Additional Info
|-
| [https://www.qt.io/blog/qt-task-tree-coming-soon-in-qt-6.11 Introductory Blog] ||
|-
| [https://www.youtube.com/watch?v=6f_0Se3O_xc YouTube video] || Created by [https://www.linkedin.com/in/lukaszhampf Łukasz Hampf] ([https://somcosoftware.com/en Somco Software]).
|-
| [https://www.qt.io/blog/qt-6.11-released#qt-tasktree Qt 6.11 Release Blog] || [https://www.youtube.com/watch?v=RX-dcQWcU2w&t=135s Qt 6.11 Release Video]
|-
| [https://doc-snapshots.qt.io/qt6-dev/qttasktree-index.html Documentation] || Ref docs: [https://doc-snapshots.qt.io/qt6-dev/qttasktree-module.html here].
|-
| [https://code.qt.io/cgit/qt/qttasktree.git/tree/ Sources] ||
|-
| [https://code.qt.io/cgit/qt/qttasktree.git/tree/tests/auto/tasktree Autotests] ||  Includes more than 250 test cases.
|-
| [https://doc-snapshots.qt.io/qt6-dev/qttasktree-tasktree-demo-example.html Example: Demo] || Sources: [https://code.qt.io/cgit/qt/qttasktree.git/tree/examples/tasktree/demo here]. Post: [https://www.linkedin.com/posts/jaroslaw-kobus_qt-tasktree-qttasktree-activity-7391363871233499136-Y5po/ here].
|-
| [https://doc-snapshots.qt.io/qt6-dev/qttasktree-tasktree-trafficlight-example.html Example: Traffic Light] || Sources: [https://code.qt.io/cgit/qt/qttasktree.git/tree/examples/tasktree/trafficlight here]. Post: [https://www.linkedin.com/posts/jaroslaw-kobus_qt-tasktree-qttasktree-activity-7392166391941873665-RqWV/ here]. An alternative implementation of [https://doc.qt.io/qt-6/qtscxml-trafficlight-widgets-static-example.html Traffic Light example] using TaskTree.
|-
| [https://doc-snapshots.qt.io/qt6-dev/qttasktree-tasktree-imagescaling-example.html Example: Image Scaling] || Sources: [https://code.qt.io/cgit/qt/qttasktree.git/tree/examples/tasktree/imagescaling here]. Post: [https://www.linkedin.com/posts/jaroslaw-kobus_iterating-in-parallel-with-qttasktree-activity-7396409700025769984-dNw4/ here]. An alternative implementation of [https://doc.qt.io/qt-6/qtconcurrent-imagescaling-example.html Image Scaling example] using TaskTree.
|-
| [https://codereview.qt-project.org/c/qt-creator/qt-creator/+/481573 Image Scalling diff] || Difference in the implementation of the ImageScaling example using QFuture::then() and TaskTree.
|-
| [https://codereview.qt-project.org/c/qt/qtbase/+/565933 Asset Downloader diff] || Patch replacing the old implementation of the asset downloader with TaskTree employed.
|-
| [https://qt-project.atlassian.net/issues/?filter=18585 Suggestions] ||
|-
| [https://qt-wiki-uploads.s3.amazonaws.com/images/5/56/TaskTreePresentation.pdf Presentation 2024] ||


The TaskTree's implementation is separated from the QtCreator specific code and may already serve as a general purpose solution outside of QtCreator.
|}
[[File:TaskTree.jpg|thumb|The first public TaskTree presentation on Sep 28th 2023 at Felgo office, Vienna.]]
[[File:Spyrosoft.jpeg|thumb|TaskTree presentation in Technopark Pomerania at the invitation of Spyrosoft on Oct 18th 2023.]]

Latest revision as of 17:00, 23 March 2026


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 is 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

Link Additional Info
Introductory Blog
YouTube video Created by Łukasz Hampf (Somco Software).
Qt 6.11 Release Blog Qt 6.11 Release Video
Documentation Ref docs: here.
Sources
Autotests Includes more than 250 test cases.
Example: Demo Sources: here. Post: here.
Example: Traffic Light Sources: here. Post: here. An alternative implementation of Traffic Light example using TaskTree.
Example: Image Scaling Sources: here. Post: here. An alternative implementation of Image Scaling example using TaskTree.
Image Scalling diff Difference in the implementation of the ImageScaling example using QFuture::then() and TaskTree.
Asset Downloader diff Patch replacing the old implementation of the asset downloader with TaskTree employed.
Suggestions
Presentation 2024
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.