Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"?

like image 728
Cel Avatar asked Jan 07 '12 11:01

Cel


1 Answers

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.

like image 146
Nick Butler Avatar answered Sep 28 '22 06:09

Nick Butler