Can anyone enlighten on the story behind this? Whats the story behind trying to depreciate async? Google returns nothing.
SG1 thought it would be a reasonable remedy to deprecate async and replace it with
something else that doesn't return futures.
Well, deprecation doesn't make async go away, so the situation wouldn't have
changed much - other than a clear message that the current async has issues.
There are plans for a replacement. It should appear in a TS before C++17. And
hopefully the TS will lead to a good replacement for C++17.
The deprecation of async in C++14 would, in a way, have documented these plans
of SG1 in the standard.
Cheers,
Matthias
--
─────────────────────────────────────────────────────────────
Dipl.-Phys. Matthias Kretz
Web: http://compeng.uni-frankfurt.de/?mkretz
SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc
─────────────────────────────────────────────────────────────
IMHO, async() is not broken. It just doesn't allow some use cases some people thought it would. Async() was incorporated into C++11 as a tool for novices to use concurrency without the need for low level mechanisms like thread.
f();
std::async(std::launch::async, g);
h();
// runs sequentially
But, different semantics for different future<> objects is another kind of brokenness. I don't even see how that's specified, looking now at N3690. Thanks all for the tip.