Morten
Qt
Threads
Qt Concurrent
Posted by Morten
 in Qt, Threads, Qt Concurrent
 on Friday, November 23, 2007 @ 13:17

Just a quick update to say that Qt Concurrent has been integrated into Qt/main and is now available in the snapshots. The documentation is available here, end there’s a couple of examples in the examples/qtconcurrent/ directory in the snapshot package. Enjoy!

6 Responses to “Qt Concurrent integrated!”

» Posted by Karol Krizka
 on Friday, November 23, 2007 @ 16:04

Can’t wait for this to become more used in applications, because multicore CPU’s are very common now. It could really speed up the KDE desktop and other QT based apps.

» Posted by required
 on Friday, November 23, 2007 @ 20:30

uh, map/reduce - weren’t the lisp folks all that wrong, hmm…

» Posted by ZeD
 on Saturday, November 24, 2007 @ 06:32

Hi. Just a question: how do the concurrency model compares with erlang and others Concurrency Oriented Programming languagues?

» Posted by Giovanni Bajo
 on Saturday, November 24, 2007 @ 12:59

Any plans on using multiple processes instead of multiple threads? That would help for PyQt, given that python and threads don’t play together well.

» Posted by Peter
 on Saturday, November 24, 2007 @ 13:35

Seems you’ve dropped boost::bind and written you own.

Have you considered to introduce a more generic QBind which also could be used
at other places. I assume you could do this now within a day. ;)

» Reply from Morten
 on Tuesday, November 27, 2007 @ 09:13
Morten

Hi, thanks for the interest :)

ZeD: I think Erlang has a really interesting concurrency model, where you divide your programs into lots of independent processes that communicate through message passing. This is hard to do in C++ for two reasons, first of all processes are too expensive on UNIX/Windows systems (the Erlang virtual machine makes them cheap). Second, going form a C++ “shared memory” model of programming to “shared nothing” and message passing would require a lot of code restructuring. Since Qt Concurrent is based on threads you’ll have access to all of your programs memory from all of the code.

Bajo: Using processes could be an interesting feature, but probably requires a completely different implementation :)

Peter: Yeah, there is some feature overlap here. QtConcurrent::run() supports argument binding like boost::bind, but not the placeholder syntax for example. As I understand it, bind() is going to be a part of C++0x/TR1, so we probably won’t add it to Qt. (And you can still use boost::bind with QtConccurent if you want it today.)