XDispatch provides the power of Grand Central Dispatch not only on Mac OS 10.6+ but also on Windows and Linux. The XDispatch framework consists of three libraries:
Please see Apple's documentation on http://developer.apple.com and the libdispatch project at http://libdispatch.macosforge.org as well.
See the Changelog or the NEWS PAGE to get to know the recent development.
The entire Grand Central Dispatch interface is available and can be found in libdispatch library.
Please note that including <dispatch/dispatch.h> is entirely sufficient and will automatically include all other headers as well.
On some platforms (namely Mac OS) a version of the libdispatch library is installed by default. Consequently on each platform xdispatch is built on, the build system will automatically search for existing dispatch implementations (possibly integrated deeper than this user space implementation can do). If found, this "native" implementation will automatically be used. If no implementation is available, our own will be used.
Currently a native libdispatch is available on Mac OS X 10.6+ only and therefore will only be used when built on that platform.
As a first level of abstraction we created a plain C++ interface providing a more object-oriented way of programming. Detailed information can be found at the related page libxdispatch.
Additionally an interface design in a 'Qt-like' fashion was created. All needed work was done to integrate it with Qt's main event loop. For more information, please see the document on libQtDispatch
When Apple introduced Grand Central Dispatch it extended its compilers by a new feature they called "Blocks". Basically this is lambdas (sometimes called closures as well). They allow an easier way to utilize the libdispatch api and are available when using Clang or the gcc 4.2 that's shipped with Apple's current Developer Tools.
On compilers implementing the block syntax, it is fully functional when using this port. However we support way more compilers when using the C++ interface libxdispatch. Please see the documentation found over there for extended details.
Requirements differ depending on your goals. Please see the Requirements page for details.
Since version 0.3 libXDispatch is provided as ready-to-use binary package within the downloads section at http://opensource.mlba-team.de/xdispatch/files.
The current xdispatch sources can both be browsed at https://github.com/mlba-team/xdispatch and are accessable using git as well. To get your own copy, run:
git clone https://github.com/mlba-team/xdispatch.git
Please be aware that this is a project still in progress. As such we might introduce interface changes and new functionality until reaching version 1.0 - have a look at the Changelog for details and the current progress. When using this library within a project we recommend to use one of the tagged versions or the stable branch available by using subversion:
git clone https://github.com/mlba-team/xdispatch.git && git checkout <version number here> git clone https://github.com/mlba-team/xdispatch.git && git checkout stable
Those versions were tested on a lot of platforms and should be stable to use. Nevertheless you are encouraged to update to the latest version whenever a new release is published as this way you will benefit of further bugfixes, enhanced performance and new functionality of libxdispatch providing even better means for implementing concurrent software.
Please do not forget to take a look at the sections concerning Requirements and a way for Getting Started. In case you want to report a bug or contribute to this project, please contact us using email via xdispatch (at) mlba-team.de or subscribe to the mailing list at http://opensource.mlba-team.de/mailman/listinfo/libxdispatch