Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Libdispatch is open source (macosforge.org)
30 points by edw519 on Sept 11, 2009 | hide | past | favorite | 4 comments


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?


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).


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/


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"...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: