Details
-
Task
-
Resolution: Done
-
P3: Somewhat important
-
6.0
-
None
-
13
-
Qt6_Foundation_ Sprint 14
Description
Addressing the latest (post-merge) commit feedback from Marc Mutz on QPromise [1]:
- Simplify QPromise move constructor/assignment (should improve construction performance in theory):
- Introduce move semantics to QFutureInterface
- Make construction noexcept (many STL containers use std::move_if_noexcept, so it might prove useful)
- Make QPromise::swap public and introduce qSwap/std::swap overloads for QPromise (might be beneficial)
Extra:
- Unify cancel and finish in QPromise destructor (now 2 separate calls to QFutureInterface::cancel() and QFutureInterface::reportFinished() -> should be a single call)
Note: some optimizations might also be useful for the QFuture (e.g. move semantics, swaps).
Attachments
Issue Links
- relates to
-
QTBUG-81586 Provide a QPromise for the QFuture
- Closed