[Qt-interest] Peer Review for Changes to Mandelbrot Sample + New Library

Hostile Fork hostilefork at gmail.com
Fri Jan 22 00:15:21 CET 2010


Hello everyone,

I'm releasing an **experimental** new library under the LGPL for people to take a look at.  Like QtConcurrent, it removes the need to code directly to threading primitives in order to get concurrency.  But it supplies pause/resume/cancel functionality for a QRunnable-style interface (which QFuture does not support).  It's also built on the idea of copy-on-write "snapshots" for capturing data out of a long-running operation on another thread (using QSharedDataPointer under the hood).

The library is called Thinker-Qt.  To demonstrate the ideas in a familiar context, I adapted the Mandelbrot threading example to use the API.  Here is the diff:

	http://gitorious.org/thinker-qt/thinker-qt/commit/458eb50b3163bca241916e93bd6a21dc598d6b6f

(Note that you can see annotations by clicking the dark numbered circles to the left, and add your own comments.  The "side-by-side" view selectable from the upper-right of the page is a little bit more readable... but it doesn't show those comments inline.)

A more descriptive writeup of the Mandelbrot changes and a slide deck are available on the project's homepage:

	http://hostilefork.com/thinker-qt/

In its current state, the library can be used to compile and run the modified Mandelbrot, as well as some more complicated tests.  But the implementation is in flux and there's a lot I'd like to see hammered into better shape.  I'm tempted to keep tinkering until that's all fixed, but my hope is that putting out an imperfect codebase will accelerate the process of improvement.  You guys almost certainly know more about this kind of thing than I do!  :)

So please feel free to give any thoughts on interface, implementation, packaging, method names, directory structure...anything.  I'm also interested if there are any similar libraries around.  You can reply to me via email, directly on lines of code, or by a comment on the webpage.

Thanks for your time!
Brian



More information about the Qt-interest-old mailing list