QtCS2024 TaskTree: Difference between revisions
No edit summary |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
TaskTree ([[TaskTree|https://wiki.qt.io/TaskTree]]) is a solution for automatic management of asynchronous tasks. It is used in many places inside QtCreator. The first non-Creator usage is AssetDownloader (shared among many Qt examples) for the upcoming Qt 6.8 release. The presentation shows in more details what this solution is about, how you may start using it and a short description about new task tree functionalities added recently. | TaskTree ([[TaskTree|https://wiki.qt.io/TaskTree]]) is a solution for automatic management of asynchronous tasks. It is used in many places inside QtCreator. The first non-Creator usage is AssetDownloader (shared among many Qt examples) for the upcoming Qt 6.8 release. The presentation shows in more details what this solution is about, how you may start using it and a short description about new task tree functionalities added recently. | ||
[[File: | [[File:TaskTreePresentation.pdf|thumb|The presentation used on Qt Contributor Summit '24, Würzburg, 6 Sep 2024.]] | ||
[https://qt-wiki-uploads.s3.amazonaws.com/images/5/56/TaskTreePresentation.pdf Presentation '24] | |||
==Session Owners== | ==Session Owners== | ||
Line 17: | Line 18: | ||
** Only the ConcurrentCallTask is related to this module, other task types (e.g. QProcess or NewtorkQuery) and task tree itself don't relate to this module. | ** Only the ConcurrentCallTask is related to this module, other task types (e.g. QProcess or NewtorkQuery) and task tree itself don't relate to this module. | ||
* What Qt modules the TaskTree depends on? | * What Qt modules the TaskTree depends on? | ||
** The TaskTree itself depends only on QtCore. | ** The TaskTree itself depends only on QtCore. Custom tasks depend on modules they come from. E.g.: NetworkQuery task depends on QtNetwork module, and so on. | ||
* What's the magic behind the conditional expressions implementation? | * What's the magic behind the conditional expressions implementation? | ||
** Implicit intermediate (temporary) objects. | ** Implicit intermediate (temporary) objects. |
Latest revision as of 15:37, 28 September 2024
Session Summary
TaskTree (https://wiki.qt.io/TaskTree) is a solution for automatic management of asynchronous tasks. It is used in many places inside QtCreator. The first non-Creator usage is AssetDownloader (shared among many Qt examples) for the upcoming Qt 6.8 release. The presentation shows in more details what this solution is about, how you may start using it and a short description about new task tree functionalities added recently.
Session Owners
Jarek Kobus
Notes
A brief presentation of the TaskTree, including recently added features like logical operators, conditional expressions and for loops.
There were quite a lot of interesting questions asked:
- Is it possible to run the TaskTree recursively?
- It's possible to nest TaskTree inside the task tree recipe and setup the nested task tree dynamically.
- What's the relation to the QtConcurrent module?
- Only the ConcurrentCallTask is related to this module, other task types (e.g. QProcess or NewtorkQuery) and task tree itself don't relate to this module.
- What Qt modules the TaskTree depends on?
- The TaskTree itself depends only on QtCore. Custom tasks depend on modules they come from. E.g.: NetworkQuery task depends on QtNetwork module, and so on.
- What's the magic behind the conditional expressions implementation?
- Implicit intermediate (temporary) objects.
- Is it possible to start 2 tasks working together like a pipe?
- Yes, there are cases like that in Creator - we use a helper BarrierTask which holds the execution of a group until the barrier is passed. The barrier is passed when it's advanced - and this may be done from any other running task.
There was also a feedback that the solution seems useful and it's worth to start thinking about having it as a part of Qt.