Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
18 votes
3 answers
35k views

How to justify using await instead of .Result() or .Wait() in .NET Core?

Since the inception of .NET Core, console apps, function apps, ASP.NET etc. are not using synchronization context in async methods (so they're synchronizing straight to Thread Pool). This means that ...
kor_'s user avatar
  • 289
6 votes
3 answers
4k views

Why is it necessary for every new api to be async?

I'm expressing my frustration here somewhat, but why do many new libraries only have asynchronous APIs? For example I'm creating a small utility to fetch a web page and parse some data from it. ...
spirc's user avatar
  • 280
2 votes
1 answer
2k views

Will (await method).ToList() block the thread? [closed]

I'm using a lot of async Task<IEnumerable<T>> methods and I want to stop doing this everytime to get the items as a list: var items = await AsyncMethodThatReturnsEnumerable(); var ...
Dimitris's user avatar