Background
I'm a developer who's in the throes of building an application for the Mac. I'm about to get my hands on Snow Leopard. Until now I've been building on Leopard. I've only been doing Cocoa development for about a year not very intensely.
I've read a lot about Snow Leopard and Grand Central Dispatch in particular. I'm aware that it uses blocks, but I've not got into the nitty gritty of how blocks work or how Grand Central Dispatch works.
My Question
How do I best develop one code base for both Snow Leopard and Leopard, whilst taking advantage to the most degree possible of the new multi threading stuff in Snow Leopard?
NSOperationQueue
My instinct is not to deal with GCD directly in my code, but when things need putting on a Queue, use NSOperationQueue, since I've read from Mike Ashes Q&A sessions that in Snow Leopard, NSOperationQueue takes full advantage of GCD and the crasher he discovered in Leopard has now been fixed.
Manual Thread Management
However, when it comes to managing specific background threads, is there any way to take advantage of the easier to use thread management stuff in Snow Leopard without breaking things in Leopard? Or would people recommend I have different targets for each OS with some different classes in each? This to me would seem like a maintenance nightmare just waiting to happen.
Or maybe I should just live with not having my app optimised fully for Snow Leopard and stick with +(void)detachNewThreadSelector:toTarget:withObject:
or something similar.
What do people think?