TaskTree CS23: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
==Session Summary== | ==Session Summary== | ||
* Introduction and Demo of the [[TaskTree]] from Qt Creator's library of solutions | |||
==Session Owners== | ==Session Owners== | ||
Line 44: | Line 45: | ||
* Demo time | * Demo time | ||
=== Discussion === | |||
* how to handle errors and clean up after error? | |||
** Done handler | |||
* any plans for a task graph? | |||
** No plans | |||
** Working on repeating tasks, which might be sufficient for task-reuse | |||
* Is there a visual component? | |||
** Not part of the scope, but there's an example/demo | |||
* monadic APIs | |||
** might be something worth looking into |
Latest revision as of 12:30, 30 November 2023
Session Summary
- Introduction and Demo of the TaskTree from Qt Creator's library of solutions
Session Owners
- Presentation by Jarek
- Minutes taken by Volker
Notes
- Introduction to TaskTree
- generic Qt-based solution for automatic execution of a set of asynchronous tasks
- manages execution of tasks
- TaskTree class
- emits done signal with result
- executes "recipe" after the task tree has been started
- Recipe
- a value of type "Group"
- doesn't do anything on its own
- encapsulates
- execution mode (e.g. "sequential", "parallel")
- workflow policy ("stopOnError")
- list of tasks
- Group objects can be nested
- Tasks can be of type ConcurrentCallTask<ResultType>, using Qt Concurrency types
- Custom tasks, subclassing TaskAdapter<Type>
- describes how to create an asynchronous task
- E.g. QTimer, QProcess, ConcurrentCall, NetworkQuery, ...
- Naming convention: tasks correspond to task class type, e.g. QProcessTask is a TaskAdapter<QProcess>
- Access task object with task(); reimplement start(), emit done
- Handlers
- custom tasks constructor takes 2 handler arguments (callables/functors): setup handler, done handler
- Storage<DataType> type provides inter-task data exchange
- handlers can capture the storage object
- storage uses a QSharedPointer for the data storage, so capturing by value is ok
- e.g. done-handler writes result to storage, setup-handler of next task reads data from storage
- Demo time
Discussion
- how to handle errors and clean up after error?
- Done handler
- any plans for a task graph?
- No plans
- Working on repeating tasks, which might be sufficient for task-reuse
- Is there a visual component?
- Not part of the scope, but there's an example/demo
- monadic APIs
- might be something worth looking into