

Libdispatch is open source - edw519
http://libdispatch.macosforge.org/

======
pieter
I wonder how hard it is to make libdispatch available for Leopard. I don't
mind requiring Snow Leopard for development, but the resulting binary should
be runnable under both Leopard and Snow Leopard, without requiring potential
new developers to jump through hoops. Possible?

~~~
liscio
From the brief description on the site, it sounds possible.

Kernel support is not mandatory, as it only provides optimizations. So you're
good there.

You will have to supply a build of the GCC compiler that supports blocks, and
make it play nicely with Xcode (provided you're talking about end-user apps to
take advantage of libdispatch). This shouldn't be too bad, but requires more
Xcode-fu than the majority of Mac devs have.

The thing is, you should still use NSOperation for most multithreaded coding
tasks in Snow Leopard, as it is now implemented using GCD underneath. You
should only really monkey around with libdispatch calls directly if you're
seeing performance problems with NSOperation (verified using profiling, of
course).

I think the real benefit of this OSS project is going to be porting
libdispatch to entirely different platforms (Linux, BSD, Windows, ...), and
building NSOperation-like constructs in other languages/APIs to be used on
many platforms (including the Mac, in the end).

~~~
Zev
_You will have to supply a build of the GCC compiler that supports blocks_

That's been available for awhile: <http://code.google.com/p/plblocks/>

------
jasongullickson
Definitely one of the most under-appreciated parts of Snow Leopard; anyone who
has used BeOS can appreciate the value of making it easy for developers to
"thread pervasively"...

