c# - async-await threading internals -


I'm curious about async waiting for internal threading.

Everyone says that Async is so much better performance, because it frees those threads that are waiting for the reaction of the long asynchronous call. Okay, I get it.

But consider this scenario.

I have an async operation executed on an async methodA database. The API function of the database exposes the beginners and event queries. I wrapped those people with work (with the use of working resources).

My question is, what is happening under the hood between calling initial calling and firing event queries.

I mean - no need to create any kind of worker to set fire to this incident? At a very low level this should be some synchronous loop which is blocking thread reading results from DB.

Do I feel that any async call should generate thread to generate a reaction (maybe wait for it

then our only "benefit" is that the caller Thread can be free when some other thread is doing its job.

Does calling an asynchronous method can always create a new employee thread?

Does anyone confirm my understanding ?

Everyone says that async is very good in terms of performance, because it leaves those threads that wait for the response of the long asynchronous call

The primary advantage of accountability is because the UI thread is released in server applications The primary benefit of async is scalability, because the request thread is freed to control other requests.

Then our only "benefit" is that the collar thread can be free when some other thread is doing its job. Is always calling an asynchronous method, is there any new employee creating threads?

Not at the OS level, all I / O is asynchronous; it is a synchronous API that blocks a thread while the underlying asynchronous I / O is in progress I recently posted a blog post It is written.


Comments