QtCS2024 TaskTree: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Update)
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Session Summary==
==Session Summary==
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: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 11: Line 14:


* Is it possible to run the TaskTree recursively?
* 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
** 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?
* What's the relation to the QtConcurrent module?
** Only the ConcurrentCallTask is related to this module, other task types (e.g. QProcess or NewtorkQuery) 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 custom tasks depend on modules they come from (e.g. NetworkQuery task depend on QtNetwork module and so 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?
* 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.

The presentation used on Qt Contributor Summit '24, Würzburg, 6 Sep 2024.

Presentation '24

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.