QtConcurrent

I’m not going to discover America, but it looks like the evolution of (personal) computers in terms of raw CPU power and GHz values has slowed down to a crawl, while the overall processing power increases thanks to additional cores. Intensively parallel computing may be an exciting vision, but writing software that could make use of many CPU cores is challenge. It’s not a secret that multi-threading is harder than sequential programming, with all related algorithmic and hardware problems like deadlocks, race conditions, cache ping-pong, locking contention and so on – no wonder some people predict that Erlang is going to be the next Big Thing – concurrent programming based on message passing is more scalable and seems easier to get right.

Having all these things in mind, I’ve recently stumbled upon an interesting addition to the Trolltech’s Qt library (which I like very much): QtConcurrent is a project that makes multi-threaded programming with Qt much easier (on all supported platforms!). Not only does it implement asynchronous function calls and Google’s Map-Reduce algorithm, but also, according to the website, is capable of determining the number of available processors/cores and adjusts the number of threads accordingly! Neat.

I’m definitely going to use it in a little Secret project of mine (WIP).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s