My latest column for MSDN Magazine is now available online as well as in print.
Last month I explored a simple technique that you can use today with any C or C++ compiler to implement lightweight cooperative multitasking by simulating coroutines with macros. Although adequate for the C programmer, it presents some challenges for the C++ programmer, who naturally and rightly relies on local variables among other constructs that break the abstraction. In this column, I’m going to explore one possible future direction for C++ to directly support asynchronous programming in a more natural and composable way.
This is the second of three articles where I explore alternative techniques for achieving concurrency in C++. Thanks again to Artur Laksberg from the Visual C++ team for reviewing the drafts and providing valuable feedback.
You can find links to more of my articles here.