News for hackers. Stuff that matters.
Re:WinRT demystified by joeshaw on Thursday September 15, 2011 @02:32PM (#3001492)
CountEveryBitByHand() is a function which returns a promise. (I don't know if that's what they call it in C# 5.)

The await keyword is a new one in C# 5 which halts execution until the promise is fulfilled. Then execution is resumed from that point, and the expression can be evaluated and the function returns.

It's similar to how inlineCallbacks in Twisted work, if you're familiar with those.

Re:WinRT demystified by davidpadbury on Thursday September 15, 2011 @04:25PM (#3001969)
(I don't know if that's what they call it in C# 5.)

Tasks - http://msdn.microsoft.com/en-us/library/system.threading.tas....