Hacker News new | ask | show | jobs
by chrisdevereux 3946 days ago
One of the occasionally annoying things about developer communities is their tendency to present certain technologies as unqualified 'magic' and one should be thankful for developing for platform x because only it has technology y. GCD is sometimes presented this way, when it's mostly just a thread pool with a nice API.

Which is why articles like this are so great. When I was first dipping my toes into development, Mike Ash's articles were a great help in cutting through the marketing hype and realising that these are mostly things you could have implemented yourself given the time and inclination.

2 comments

While I quite agree with your general point I think GCD is often under appreciated. Characterizing GCD as "mostly just a thread pool with a nice API" glosses over the key feature which Mike Ash specifically points out is not in this implementation: "the number of threads in the global pool scales up and down with the amount of work to be done and the CPU utilization of the system." Making the pool aware of the utilization of the whole system as a whole is the key feature of GCD. This also cuts to why something like this is best if it is created and promoted by the system vendor: the more GCD is utilized by the system software and third party applications the better the system will perform as a whole.
You clearly didn't read the article, which repeatedly states that GCD is not just a thread pool with a nice API.

The whole point of it is that GCD is a lot more efficient than that because it is optimized across the whole system. The author intentionally chooses to omit this because he is trying to present a simplified example for educational purposes.