Kenny Kerr

Back to the Future with Resumable Functions

with 2 comments

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.

Written by Kenny Kerr

1 October 2012 at 2:46 pm

Posted in Uncategorized

2 Responses

Subscribe to comments with RSS.

  1. 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.

    Rick Brewster

    2 October 2012 at 1:03 pm

    • Neat! Having experimented with coroutines now in C, C# and C++ I cannot imagine why it’s taken so long for this idea to take hold.

      Kenny Kerr

      2 October 2012 at 1:10 pm


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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 438 other followers