And the difference between async await task and understanding (may be wrong)

task then is to direct a new thread running task in the new thread method

 

async await word does not necessarily create a new thread, when the program runs to await the time, await operator calls continuewith on the Task object, he passed to the method used to restore the state machine, then thread asynchronous method async statement from return sometime in the future, after the operating await execution in the end, a thread pool thread will inform the Task object, which activates ContinueWith callback method, resulting in a recovery state machine thread, a thread is simply re-enter the Async asynchronous method and starting from the position await operator.

Guess you like

Origin www.cnblogs.com/blueGao/p/11431469.html