I do not own this content. For original content http://www.microsoft.com/netherlands/...
Channel 9
C#
Conference
.NET
dotnet
State Machine
The state machine is where task will be executed and will reference which thread initiated that task so that when that task is completed, the state machine will notify the caller thread that the task has finished.
Async Keyword
Async indicate that this method will be executed asynchronously. It will run in State machine. When we add the "Async" keyword in method signature, the compiler will create a class based on method name inherited that from State Machine interface.
Await Keyword
Every Task should be awaited. If not, then executing the thread won't wait for that Task, which is executing asynchronously. Basically, it returns to caller thread with reference to ongoing task and stop execution of code below that line and release the current thread to thread pool to process another request.
Async and await are always used together, if not, then there will be something wrong.