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

Add QFuture::thenWithPromise()

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Core: Threads
    • None

    Description

      A future returned by runWithPromise() may be used as a starting point in the future.then.then chain, however, we are not getting access to then()'s promise, so we are not so flexible in "thens" as we are in the starting runWithPromise. For API completeness it looks like we are missing the continuation which would accept the QPromise &, like inside runWithPromise().

      The suggestion is to add QFuture::thenWithPromise() methods, similar to QFuture::then(), which could accept the additional argument of "QPromise &promise" type, passed as a first argument to the handler.

      Update: as we have resigned from separate method QtConcurrent::runWithPromise() and provided an overload for QtConcurrent::run() that accepts the additional "QPromise &" argument instead, the suggestion is to oveload QFuture::then() in the same way.

      Attachments

        Issue Links

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

          Activity

            People

              sonakur Sona Kurazyan
              jkobus Jarek Kobus
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes