Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.13.0 RC 1
-
93642992ae779f3d8c864e5680ff2dfdfa9d0331
Description
Documentation somewhat incorrectly states that tasks started by run() cannot be cancelled:
Be aware that not all asynchronous computations can be canceled. For example, the future returned by QtConcurrent::run() cannot be canceled; but the future returned by QtConcurrent::mappedReduced() can.
https://doc.qt.io/qt-5/qfuture.html#cancel
Also it says similar in here:
Note that the QFuture returned by QtConcurrent::run() does not support canceling, pausing, or progress reporting. The QFuture returned can only be used to query for the running/finished status and the return value of the function.
https://doc.qt.io/qt-5/qtconcurrent.html#run
But these tasks can be canceled if the task in question has not been started yet. ie. it could still be waiting in the queue.