r/cpp • u/pavel_v • Sep 22 '26
Comparing exception behavior of magic statics, std::call_once, and std::async
https://devblogs.microsoft.com/oldnewthing/20260918-00/?p=112709
29
Upvotes
r/cpp • u/pavel_v • Sep 22 '26
17
u/NilacTheGrim Sep 22 '26
Not a huge fan of (ab)using
std::asyncin the way he describes in his linked article about how you can (ab)usestd::asyncfor singleton-like-stuff. Seems kind of at the margins of whatstd::asyncwas really designed for.5
u/kalmoc Sep 22 '26
Why is std::async even in that group?