Tuesday 22 February 2011

Simplified APM with C#

This article by Jeffrey Richter is well worth taking a look at, whether you'll be using multithreaded programming any time soon or not.

It gives a good explanation of the extra complexity that async programming introduces to your code, and as an added bonus it gives a thorough explanation of what it takes to implement an iterator and how the "yield" statement reduces a lot of that code.  Then the author joins up the two themes and makes the conceptual leap of using C# iterators as a simplified way to do asynchronous programming.  I can safely say that even if I had as an in-depth a knowledge of iterators as Mr Richter I would definitely not have had the brain power to spot that there would be a practical application for them in async programming. 

No comments:

Post a Comment