Back to the Future with Resumable Functions

My latest column for MSDN Magazine is now available online as well as in print.

I necessarily began this series of articles exploring alternative techniques for achieving concurrency with a practical solution because the reality is that we need solutions that work today. We do, however, need to look to the future and push the C++ community forward by demanding greater support for writing I/O-intensive applications in a more natural and productive manner. Surely writing highly scalable systems shouldn’t be the exclusive purview of JavaScript and C# programmers and the rare C++ programmer with enough willpower.

This is the last 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.

Here is the complete series:

  1. Lightweight Cooperative Multitasking with C++
  2. The Pursuit of Efficient and Composable Asynchronous Systems
  3. Back to the Future with Resumable Functions

You can find links to more of my articles here.

2 thoughts on “Back to the Future with Resumable Functions

  1. Rick Brewster

    Coroutines are so much fun. I use them in the Paint.NET installer via the C# iterator feature (“yield return”). It let’s me write my “install script” as a logically sequential block of code which is able to jump back and forth between the UI thread and a background thread by way of emitting directives to a scheduler (“yield return new SwitchToThreadDirective(…)”). This way I can hop to the UI thread, turn on the progress bar, then hop back to the background thread and do a blocking call to something expensive or time consuming, etc.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s