First off, Hi! I don't know if you came via my website but most of my other projects live on my personal website at http://www.sysctl.co.uk/. This is an open implementation of the Grand Central Dispatch API provided in Mac OS X 10.6 (Snow Leopard). Not a very clever one but one nonetheless.
Forgive me if this is in flux slightly, however, using Wigan Wallgate in your application should be relatively straight forward. The API is designed to conform to the dispatch/dispatch.h provided with Snow Leopard, unfortunately some fiddling is required because it isn't possible to automagically link WW into the CFRunloop of your main thread (like GCD does) or automatically initialise the worker threads used by WW.
In order to use WW, you should follow this small checklist:
<dispatch/dispatch.h> include directives to <WiganWallgate/dispatch.h>
Also, WW is linked against PLBlocks and expects to find it "installed" in @executable_path/../Frameworks/ in order to link against it at runtime.
So this is a relatively new project and here is how far I've got compared to the native GCD implementation. I've implemented enough to get a "useful" GCD based app off the group. Write fd support should be easy to add, some of the other sources ... not so much.
Implemented:
dispatch_{a}sync{_f}()dispatch_apply{_f}()dispatch_after{_f}()dispatch_{wall}time()My ultimate intention with WW is to allow you to compile your GCD based projects with the 10.6 SDK and link in WW to allow support for GCD calls on non-10.6 platforms. Currently the PLBlocks compile cannot target the 10.6 SDK whilst compiling code to run on Mac OS X 10.5, this is a problem that the PLBlocks group have talked about on their mailing list and hopefully will support sometime in the future. The effect of this is that you can choose to compile in one of two ways:
Further to this, I do not boast any kind of performance tuning has gone into WW. This first cut is intended to provide a partially implemented set of the GCD API in order to keep my personal projects happy on Leopard. I would welcome suggestions, patches, forks, notes by carrier pigeon with your ideas on how better to optimise WW so it doesn't completely suck.
WiganWallgate is licensed under the MIT license which can be found here in the LICENSE file in my repository or here at the Open Source Initiative.
Matt Wright (matt@sysctl.co.uk)
Matt Wright (matt@sysctl.co.uk)
Binary builds will be available once the codebase has stabilised and I've got some builds set up.
You can download the source code to this project in either zip or tar formats.
You can also clone the project with Git by running:
$ git clone git://github.com/daagaak/WiganWallgate