QtCS2024 TaskTree: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Notes added)
(Update)
Line 8: Line 8:
A brief presentation of the TaskTree, including recently added features like logical operators, conditional expressions and for loops.
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, e.g.:
There were quite a lot of interesting questions asked:


- about nesting TaskTrees in TaskTree
* 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) don't relate to this module
* 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).
* 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.


- what's the relation to the QtConcurrent module
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.
 
- what Qt modules the TaskTree depends on
 
- about implementation of the conditional expressions
 
- whether it's possible to start 2 tasks working together like a pipe
 
There was also a feedback that it's worth to start thinking about having it as a part of Qt.
[[Category:QtCS2024]]
[[Category:QtCS2024]]

Revision as of 19:21, 6 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) don't relate to this module
  • 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).
  • 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.