I've got async action method which return Task and inside it I call some function (involved with I/O operation) with await. Let's say that this function's doing some serious stuff which takes a long time => so the control is returned immediately to sth which call async action and then it probably will wait for the value returned by action method. Who is this guy?
Next thing: Request... what's going on here? With a new request I get one thread from thread pool. When i see await in async function I believe that this thread's going back to its thread pool => but the page is loading. So who does this loading thing? Eventually, after loading I get my result.
The last thing: Only one thread. Who's performing the rest of async function(after await). If it does by the same thread who calls it i see here some context switching? Am i right?
Asked
Active
Viewed 54 times
1

WaltLift0
- 43
- 1
- 5