[Development] The future of QFuture, and QtConcurrent (was "Is QtConcurrent's code generator still in use?")
olivier at woboq.com
Fri Nov 16 19:36:37 CET 2012
On Thursday 15 November 2012 23:08:39 Sze Howe Koh wrote:
> Thiago also hinted that QtConcurrent development is being minimized
> ("...we're not developing QtConcurrent anymore and shouldn't be
> spending any effort on this than necessary to keep it working" ).
> That suggests that the dev team has reached a dead end with the code
> -- although the problems aren't immediately obvious to outsiders.
> If the quality of QtConcurrent is subpar and there's little chance of
> improving, then I think it's important to let Qt users know that --
> through documentation and/or deprecation -- so that they don't
> unwittingly invest their resources in stagnant technology. The current
> impression I get from the official documentation is that QtConcurrent
> is a high-level alternative to QThread and QRunnable.
> QtConcurrent offers the ability to run a function in parallel, and to
> process a container's elements in parallel. The former can be replaced
> by QRunnable to an extent... but what about the latter? Are there
> strong use cases for parallel container processing, and is it worth
> salvaging that functionality?
QtConcurrent is fine, but its implementation has issues.
Both in the "front-end" (the templated code in the headers), and in the actual
implementation (data structures that don't scale well, ...)
Nothing that cannot really be fixed, but they would need to still re-think big
parts of QtConcurrent, so that would be a huge work.
Is this work worth it when there are already others libraries that offer same
features (if not better)
ThreadWeaver. Currently part of the KDE libraries. It has been splitted in a
separate QtAddon as part of the work on KDE Frameworks.
The other option is to use the C++ standard library. C++11 contains many
threading primitives. http://en.cppreference.com/w/cpp/thread
Woboq - Qt services and support - http://woboq.com
More information about the Development