[Qt5-feedback] Better support for asynchronous code
olivier.goffart at nokia.com
olivier.goffart at nokia.com
Sun Jun 5 13:08:11 CEST 2011
Hi,
There is Qt Concurrent and QFuture. Those would benefit from some work.
We have plans to support the C++0x lambda expressions, that might help to keep the asynchronous code in-place.
There is also the KJob API that is really great for some asynchronous operations.
http://api.kde.org/4.x-api/kdelibs-apidocs/kdecore/html/classKJob.html
________________________________________
Fra: qt5-feedback-bounces+olivier.goffart=nokia.com at qt.nokia.com [qt5-feedback-bounces+olivier.goffart=nokia.com at qt.nokia.com] på vegne av ext Peter Kümmel [syntheticpp at gmx.net]
Sendt: 5. juni 2011 11:56
Til: qt5-feedback at qt.nokia.com
Emne: [Qt5-feedback] Better support for asynchronous code
Very often it is needed to write asynchronous code
(eg. when networking). Qt provides all necessary
low level stuff: signal, slots, threads,
queued connections.
But the code which implements the asynchronous behavior
is less readable than the code of a synchronous control
flow: Lot of small functions (the slots), several threads,
signals, connections.
This way the risk is high to end up with a modern form of
"Spaghetti Code". In case of Qt I would call it the
"Signal Slot Massacre". (Could eventually be avoided by using
a state machine)
What I like to see in Qt5 is better support to produce
readable asynchronous code.
Maybe other languages (Erlang, Objective-C, Scala, ...) or
libraries (Grand Central Dispatch, Threading Building Blocks)
could inspire solutions which make Qt/C++ better prepared
for asynchronous program flows.
Once I added a more comfortable syntax for message passing to QObjects:
http://lists.qt.nokia.com/pipermail/qt-interest/2009-September/012633.html
But I think there are many other ways to improve Qt/C++ at this topic.
Peter
_______________________________________________
Qt5-feedback mailing list
Qt5-feedback at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
More information about the Qt5-feedback
mailing list