QtConcurrent Namespace▲
-
Header: QtConcurrent
-
Since: Qt 4.4
-
qmake: QT += concurrent
-
Group: QtConcurrent is part of thread
Detailed Description▲
See the Qt Concurrent module documentation for an overview of available functions, or see below for detailed information on each function.
Function Documentation▲
int QtConcurrent::run(Function, ...)▲
Equivalent to
QtConcurrent::
run(QThreadPool::
globalInstance(), function, ...);
Runs function in a separate thread. The thread is taken from the global QThreadPool. Note that function may not run immediately; function will only be run once a thread becomes available.
T is the same type as the return value of function. Non-void return values can be accessed via the QFuture::result() function.
The QFuture returned can only be used to query for the running/finished status and the return value of the function. In particular, canceling or pausing can be issued only if the computations behind the future has not been started.
See Also▲
See also Concurrent Run
[since 5.4] int QtConcurrent::run(int *, Function, ...)▲
Runs function in a separate thread. The thread is taken from the QThreadPool pool. Note that function may not run immediately; function will only be run once a thread becomes available.
T is the same type as the return value of function. Non-void return values can be accessed via the QFuture::result() function.
The QFuture returned can only be used to query for the running/finished status and the return value of the function. In particular, canceling or pausing can be issued only if the computations behind the future has not been started.
This function was introduced in Qt 5.4.
See Also▲
See also Concurrent Run