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

QFutureInterface: reportResults with an empty vector breaks results

    XMLWordPrintable

Details

    • Linux/X11
    • 5
    • Qt6_Foundation_Sprint 38, Qt6_Foundation_Sprint 39

    Description

      Imagine a sequence of asynchronous tasks that have to proceed sequentially and accumulated result of tasks has to be provided somehow.

      The one of possible implementations (see attached archive) is based on tracking asynchronous tasks using QFutureInterface<T> and combining their results by master-QFutureInterface<T>.
      Everything works fine when all the tasks provides some results.
      Imagine that the chain of tasks containing some tasks that actually reports no results (it depends on task's logic).
      Expectation for master-QFutureInterface<T> is to ignore an empty result since task didn't actually provide it.
      However, inspecting the results of master-QFutureInterface<T> on finish shows a junk caused by reporting empty results from some tasks. This behaviour is unexpected and considered as a bug.

       

      Reproducible example attached.

      Attachments

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

        Activity

          People

            sonakur Sona Kurazyan
            eeiaao eeiaao
            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