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

QtConcurrent in 6.4.0 and later shows undesirable behaviour

    XMLWordPrintable

Details

    • Linux/X11
    • 21
    • 93047c71e (dev), 8f2a3714d (6.4), 61b8e334d (6.5), e6b53d5e4 (6.4.3)
    • Foundation PM Staging

    Description

      As per Qt 6.4.0, the behaviour of QtConcurrent behaves different from Qt 6.3.2 and before, in a way that is undesirable for an interactive application: When many concurrent threads are launched using a QFutureWatcher, results are not displayed on the screen as they become availble, but instead only after the last thread completes, after which all results are displayed "all at once".  It is as if an update to refresh the GUI is not happening until all threads have finished.

      For instance, a progress bar does not show progress until the very end of the jobs, and then  it goes quickly from 0 to 100%

      The attached sample code shows the issue in a very simple setting. To reproduce do a "cmake .." in the directory build, followed by a make -j4.  Then run ./bug246 and watch both the QMainWindow and the console. When compiled with 6.3.2 (or before) the behaviour is as expected and desired (gradually completing all threads and showing progress). With 6.4.0 and 6.4.1 this is no longer the case. The contents of QMainWindow is stuck wheras the output in the console continues, until the task have completed.

       

       

       

      Attachments

        For Gerrit Dashboard: QTBUG-109511
        # Subject Branch Project Status CR V

        Activity

          People

            cnn Qt Core & Network
            bwvb Bw vB
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes