Lightweight Cooperative Multitasking with C++
My latest column for MSDN Magazine is now available online as well as in print.
If you work for a company that has one of those coding standards documents that would annihilate an entire rainforest were it ever to be printed, you’d better stop reading now. Chances are, what I’m about to show you will violate many of the sacred cows in the aforementioned epic. I’m going to tell you about a particular technique I originally developed to allow me to write completely asynchronous code efficiently and without the need for complex state machines.
I hope you enjoy it. This is the first of three articles where I explore alternative techniques for achieving concurrency in C++. Thanks 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.