Search code examples
c#.netmultithreadingasynchronousasync-ctp

async fast path


Here is an article on how the Async CTP refresh can take advantage of the async "fast path".

It mentions things like greater efficiency etc, but I dont even know what the "fast path" is? I would like to determine whether the tips in the article are relevant to me, but could not really find an explanation of "fast path"?


Solution

  • The "fast path" is when the Task being awaited has already completed by the time it is awaited.

    If this happens, then there is no point in await returning from your method because the next continuation will be queued immediately.

    So in the "fast path", await does not yield and execution continues in your method.