Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.0 FF
-
None
-
-
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.