I have got some experience using GCD for concurrency and removing explicit locks and threads.
C++11 provides std::async, which seems to provide some similar features(, I’m not a C++ expert, please don’t blame me for mistakes on it).
Putting aside arguments on flavours and language preferences, is there any benchmark comparing the two for their performance, especially for platforms like iOS?
Is c++11’s std::async worth trying from a practical perspective?
EDIT:
As stackmonster answered, C++11 does not provide something exactly like a dispatch queue per se. However, isn’t it possible to make an ad-hoc serial queue with atomic data structures(, and arguable lambda functions) to achieve this?
C++ 11 std::async is not nearly as sophisticated as grand central dispatch.
Its more analogous to the async concurrency model provided by the java.util.concurrent package
providing templates for callbacks but with no built in performance advantages.
I would say that the difference between them is simply this.
A callback template has no particular performance characteristics. GCD is all about performance, and threading/multiplexing those callbacks to reduce thread creation overhead and allowing queuing and task dependencies and thread pooling.
The launch policies of std::async do not compare in their sophistication to GCD and are not implementation portable.
Im not really sure what a benchmark between the two would really prove since they are not that really similar.