Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84977

Improve QFutureInterface/QPromise constructors

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.x
    • 6.0
    • Core: Threads
    • None
    • 13
    • Qt6_Foundation_ Sprint 14

      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).

      [1] https://codereview.qt-project.org/c/qt/qtbase/+/300337

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            agolubev Andrei Golubev
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes