Mention QtFuture::when* functions in QFuture's docs
Also fix an unrelated minor issue in QtFuture::whenAll docs. Task-number: QTBUG-86714 Change-Id: I45f06b17db0508be10215e6d260ef76ede3077fb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
fd1a42490d
commit
086a08dcf9
@ -123,15 +123,18 @@
|
|||||||
|
|
||||||
To interact with running tasks using signals and slots, use QFutureWatcher.
|
To interact with running tasks using signals and slots, use QFutureWatcher.
|
||||||
|
|
||||||
You can also use QtFuture::connect to connect signals to a QFuture object
|
You can also use QtFuture::connect() to connect signals to a QFuture object
|
||||||
which will be resolved when a signal is emitted. This allows working with
|
which will be resolved when a signal is emitted. This allows working with
|
||||||
signals like with QFuture objects. For example, if you combine it with then(),
|
signals like with QFuture objects. For example, if you combine it with then(),
|
||||||
you can attach multiple continuations to a signal, which are invoked in the
|
you can attach multiple continuations to a signal, which are invoked in the
|
||||||
same thread or a new thread.
|
same thread or a new thread.
|
||||||
|
|
||||||
|
The QtFuture::whenAll() and QtFuture::whenAny() functions can be used to
|
||||||
|
combine several futures and track when the last or first of them completes.
|
||||||
|
|
||||||
A ready QFuture object with a value or a QFuture object holding exception can
|
A ready QFuture object with a value or a QFuture object holding exception can
|
||||||
be created using convenience functions QtFuture::makeReadyFuture and
|
be created using convenience functions QtFuture::makeReadyFuture() and
|
||||||
QtFuture::makeExceptionalFuture.
|
QtFuture::makeExceptionalFuture().
|
||||||
|
|
||||||
\note To start a computation and store results in a QFuture, use QPromise or
|
\note To start a computation and store results in a QFuture, use QPromise or
|
||||||
one of the APIs in the \l {Qt Concurrent} framework.
|
one of the APIs in the \l {Qt Concurrent} framework.
|
||||||
@ -1367,7 +1370,7 @@
|
|||||||
|
|
||||||
\snippet code/src_corelib_thread_qfuture.cpp 22
|
\snippet code/src_corelib_thread_qfuture.cpp 22
|
||||||
|
|
||||||
\note The output sequence must support random access and support \c resize()
|
\note The output sequence must support random access and the \c resize()
|
||||||
operation.
|
operation.
|
||||||
|
|
||||||
If \c first equals \c last, this function returns a ready QFuture that
|
If \c first equals \c last, this function returns a ready QFuture that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user