C# 5 async CTP: why is internal “state” set to 0 in generated code before EndAwait call?
Yesterday I was giving a talk about the new C# “async” feature, in particular delving into what the generated code looked like, and the GetAwaiter() / BeginAwait() / EndAwait() calls. We looked in some detail at the state machine generated by the C# compiler, and there were two aspects we couldn’t understand: Why the generated … Read more