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

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.2.3
    • Fix Version/s: 6.2.5, 6.3.1, 6.4.0 Beta1
    • Component/s: Core: Threads
    • Labels:
      None
    • Story Points:
      5
    • Commits:
      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)
    • Sprint:
      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

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

          Activity

            People

            Assignee:
            sonakur Sona Kurazyan
            Reporter:
            balage Balázs Oroszi
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            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