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

QPromise destructor doesn't transition to canceled state if it wasn't start()-ed

    XMLWordPrintable

Details

    • 5
    • 76a1c060ac (qt/qtbase/dev) 76a1c060ac (qt/tqtc-qtbase/dev) ae162d444f (qt/qtbase/6.3) a4acc78216 (qt/qtbase/6.3) a4acc78216 (qt/tqtc-qtbase/6.3) ae162d444f (qt/tqtc-qtbase/6.3) c9a7bedfc3 (qt/tqtc-qtbase/6.2)
    • Team A Foundation Sprint 53, Team A Foundation Sprint 54

    Description

      The docs for QPromise::~QPromise() state that the promise transitions to a canceled state on destruction, unless finish() is called.

      However, if the promise is never start()-ed but it gets deleted, then the associated future never gets canceled, and as a result QFuture::waitForFinished() will never return, ever.

      Is this intended behavior? I believe that if a QPromise is never started but deleted, it should still somehow signal to associated futures which call waitForFinished() to return. 

      Attachments

        For Gerrit Dashboard: QTBUG-101284
        # Subject Branch Project Status CR V

        Activity

          People

            sonakur Sona Kurazyan
            balage Balázs Oroszi
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes