Changing the asp.net application to use async little by little

We have an asp.net application, it does not use asynchronous or parallel methods (with the exception of some owin middleware).

I want to start using the asynchronous version of some methods using the async-wait syntax.

I know there is a danger in mixing async and sync operations, as this can cause deadlocks.

It is not possible to rewrite the entire application in one go.

Where do i start? safe way to do this is to make controller actions asynchronous and work my way down? or vice versa?

Are there any explicit warning signs that I can observe along the way like: "never use the sync method to call the async method, but fine to synchronize the asynchronous call"

+4
source share
3 answers

Where do i start? safe way to do this is to make controller actions asynchronous and work my way down? or vice versa?

"" " ". , -. , - API. , , "" , , .

- , , . , .

+3

-. - , await SynchronizationContext. , Stream.Read, .

-. IO .

+2

async sync . "sync over async" .

, , async async.

+2

All Articles