Qt Concurrent integrated!

Posted by Morten Johan Sørvig on November 23, 2007 · 6 comments

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!

QShare(this)

Possibly related posts:

  1. Lighthouse is integrated!
  2. Qt 4.7 for Maemo 5 released

6 comments

1 Karol Krizka November 23, 2007 at 5:04 pm
 

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.

2 required November 23, 2007 at 9:30 pm
 

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

3 ZeD November 24, 2007 at 7:32 am
 

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

4 Giovanni Bajo November 24, 2007 at 1:59 pm
 

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.

5 Peter November 24, 2007 at 2:35 pm
 

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. ;)

6 Morten November 27, 2007 at 10:13 am
 

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.)

Comments on this entry are closed.

Previous post:

Next post: