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

Add support for combining multiple QFutures

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • None
    • Core: Threads
    • None
    • 13
    • Team 1 Foundation_Sprint 45, Team 1 Foundation_Sprint 46, Team 1 Foundation_Sprint 47

      Add a way of future composition, i.e. creating a QFuture that becomes ready when all or any of the given futures will become available. For example:

      QFuture<int> futureFunc1 = QtConcurrent::run(func1);
      QFuture<int> futureFunc2 = QtConcurrent::run(func2);
      QFuture<void> finalFuture = QtFuture::combine({futureFunc1, futureFunc2});
      finalFuture.then([futureFunc1, futureFunce2](){ ... });
      

       (The example is from the comments of https://www.qt.io/blog/asynchronous-apis-in-qt-6)

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

            sonakur Sona Kurazyan
            sonakur Sona Kurazyan
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes