Linked Questions

0 votes
0 answers
979 views

I am trying to get my head around ConfigureAwait(false) and came across this https://devblogs.microsoft.com/dotnet/configureawait-faq/ From what I understand, and please correct me if I am wrong, is ...
Monku's user avatar
  • 2,710
1 vote
0 answers
90 views

I use async/await extensively almost everywehrre. But I saw it enough in a few places that brought my attension. What is the benefit of await task.ConfigureAwait(false) in C#? Does turning on or off ...
Sarwan Surchi's user avatar
688 votes
4 answers
292k views

When you have server-side code (i.e. some ApiController) and your functions are asynchronous - so they return Task<SomeObject> - is it considered best practice that any time you await functions ...
Aen's user avatar
  • 7,638
453 votes
2 answers
479k views

I would like to ask you on your opinion about the correct architecture when to use Task.Run. I am experiencing laggy UI in our WPF .NET 4.5 application (with Caliburn Micro framework). Basically I am ...
Lukas K's user avatar
  • 6,460
39 votes
1 answer
27k views

The question is not about what ConfigureAwait does. But rather why literally everywhere I see something like As a general rule, yes. ConfigureAwait(false) should be used for every await unless the ...
Viktor Arsanov's user avatar
36 votes
1 answer
16k views

I am learning async/await and after I read this article Don't Block on Async Code and this Is async/await suitable for methods that are both IO and CPU bound I notice one Tip from @Stephen Cleary 's ...
vietvoquoc's user avatar
12 votes
1 answer
5k views

In Unity, say you have a GameObject . So, it could be Lara Croft, Mario, an angered bird, a particular cube, a particular tree, or whatever. (Recall that Unity is not OO, it's ECS. The Components ...
Fattie's user avatar
  • 9,770
12 votes
1 answer
15k views

I'm having an issue where a task is completing, but not returning back. I have a website and a web service on different servers. The website makes a call to the web service which utilizes a library ...
Jesse McConahie's user avatar
2 votes
1 answer
1k views

So I have a method that chains tasks together to do work var tasks = new List<Task>(); tasks.Add(DoWorkAsync(1)); tasks.Add(DoWorkAsync(2)); tasks.Add(DoWorkAsync(3)); tasks.Add(DoWorkAsync(4))...
JKennedy's user avatar
  • 18.9k
5 votes
2 answers
1k views

I have simple WPF client application (.NET 4.6.2) with one button. SqlConnection.OpenAsync method blocks the UI thread when following steps are done: SQL Server is started and reachable from client ...
David Skula's user avatar
4 votes
1 answer
886 views

I am trying to understand the impact of setting ConfigureAwait(false) in an async foreach loop? await foreach (var item in data.ConfigureAwait(false)) { //... } Exactly where do we lose the ...
Joe Markov's user avatar
2 votes
1 answer
1k views

As part of my initialization of an IoTHub DeviceClient I explicitly open the connection with OpenAsync and then immediately call SetDesiredPropertyUpdateCallbackAsync. Sometimes when I call ...
Tim's user avatar
  • 422
-1 votes
2 answers
242 views

I developing many algorithms that did most of the threading by themselves by using regular Threads. The approach was always as following float[] GetData(int requestedItemIndex) With the method above ...
msedi's user avatar
  • 1,815
0 votes
0 answers
104 views

I've read lots of articles, completed a linked-in learning course and am still confused by async / await and Task.Run(). I have a WinForms app. I want to connect to two databases, and if the ...
ainwood's user avatar
  • 1,048
-1 votes
1 answer
67 views

I like threads, but I can't find any information on the Internet (maybe I just don't Know how to search for that properly) regarding what happen in the background when for example thread starvation is ...
Ryukote's user avatar
  • 792

15 30 50 per page