Files
qt-creator/tests/auto/utils/tasktree/tst_tasktree.cpp
Jarek Kobus 29f634a8ca TaskTree: Introduce WaitFor, Condition and ConditionActivator
WaitFor(condition) Group element enables postponing Group's
children execution until the condition is met. Use
ConditionActivator::activate() method to signal that the condition
is met. A call to ConditionActivator::activate() schedules a request
to the TaskTree instructing it to resume execution of awaiting
condition.

The Group containing the WaitFor element is started itself,
and its setup handler is being called. If setup handler
returned TaskAction::Continue, the children execution is being
postponed. Otherwise, when StopWithDone or StopWithError is
returned, the Group finishes and WaitFor element is no-op in
this context.

This functionality is going to be used when some part of the
task tree may continue only after some data has been collected,
and data collection took place not from inside start or done
handlers. The example is running debugger for already started
process - the debugger may run after the process already started,
delivered its PID and it's still running. In this way
we may start a debugger process in parallel in right point of time.

This patch implements the 5th point inside QTCREATORBUG-28741.

Task-number: QTCREATORBUG-28741
Change-Id: I4afaedb0b34fe0383c16a6d1f74bf07f74cc088a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-28 10:00:26 +00:00

41 KiB