News for hackers. Stuff that matters.
Re:Grand Central Dispatch Now Open to All by grogers on Friday September 11, 2009 @01:44PM (#817749)
How is this better than any other threadpool library?
Re:Grand Central Dispatch Now Open to All by scott_s on Friday September 11, 2009 @04:22PM (#818052)
System-wide integration and being able to assume it's always present.

You're right in that, as far as I can tell, there are no new ideas in GCD. But it's integrated into the language, compiler, runtime system, kernel, and developers can assume that it is present on any Mac OS 10.6 and greater. That makes a big difference.

Further discussion: http://news.ycombinator.com/item?id=782399

Re:Grand Central Dispatch Now Open to All by wmf on Friday September 11, 2009 @02:08PM (#817784)
I've found very little documentation on this, but apparently the kernel optimizes multiple thread pools to prevent excessive context switches. (Consider an N-core system where multiple processes each create N worker threads of their own.)
Re:Grand Central Dispatch Now Open to All by scott_s on Friday September 11, 2009 @04:25PM (#818058)
Do you mean process migration (rescheduling a process/thread on a different core, which does bad things to caches) instead of context switching (switching between different processes/threads on the same core, which requires saving registers to memory and does bad things to caches)? If so, any decent modern scheduler tries to avoid migrating threads.
Re:Grand Central Dispatch Now Open to All by wmf on Friday September 11, 2009 @04:33PM (#818070)
When I said context switching I meant context switching. Now that you mention it, GCD may also reduce thread migrations. I'm just speculating since we don't know how GCD works.