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

QFuture::isValid() without result

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.3
    • Core: QtConcurrent
    • None
    • Linux/X11
    • 1
    • Foundation Sprint 130

    Description

      QFuture::isValid() returns true as soon as QPromise::start() has been called. According to the documentation this is false behavior:

      "bool QFuture::isValid() const

      Returns true if a result or results can be accessed or taken from this QFuture object. Returns false after the result was taken from the future."

      As you can see in my attached excample future.isValid = true and future.resultCount() = 0 at the same time.

      When trying to take a result then the thread blocks.

      Attachments

        1. QPromise_validity.tgz
          0.6 kB
          Harald Prasser
        For Gerrit Dashboard: QTBUG-136530
        # Subject Branch Project Status CR V

        Activity

          People

            ivan.solovev Ivan Solovev
            cyril Harald Prasser
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change