I've worked with C# in the past and become somewhat spoiled by ease with which it enables asynchronous programming; in particular, by using
Now I work primarily with C++, and I have enjoyed all of the modern features they've introduced over the last few language updates. With the availability of
co_await, C++ seems to be rapidly approaching the convenience that C# offers for asynchronous programming.
似乎有许多库和框架可以“填补” C ++标准留下的空白。它们提供了等待的原语，并实现了线程池，分派器和上下文。我想为下一个项目工作，但是我遇到了一些分析瘫痪的情况。
- Microsoft PPL - this looks like the closest I've seen to replicating C# Tasks and Continuations. I saw some comments online that suggested this framework is no longer recommended, however, and I've been unable to find any more context than that.
- WinRT - this seems to be Microsoft's latest and greatest.
- cppcoro - this is an open-source and cross-platform library which appears to implement similar primitives and concepts to Microsoft's PPL.