This time its all about ConfigureAwait, why we ended up having it and how it works under the hood!
#dotnet folks, please share! I'll really appreciate it!
youtu.be/RZsLA_R8i9s?...
This time its all about ConfigureAwait, why we ended up having it and how it works under the hood!
#dotnet folks, please share! I'll really appreciate it!
youtu.be/RZsLA_R8i9s?...
I will try once I'm back at a computer...
I will try once I'm back at a computer...
You may well get away with it; provided nothing else queues to the thread that the background service is using.
Hence why you use ConfigureAwait(false) to force continuations onto the thread pool.
You may well get away with it; provided nothing else queues to the thread that the background service is using.
Hence why you use ConfigureAwait(false) to force continuations onto the thread pool.
blog.stephencleary.com/2023/11/conf...
blog.stephencleary.com/2023/11/conf...
#dotnet
#dotnet
What we can consider is, that you are allowed to add some explicit ".ConfigureAwait(...)" if you need it.
Of course "it depends" and will not fit everywhere. Hence the preprocessor directive.
What we can consider is, that you are allowed to add some explicit ".ConfigureAwait(...)" if you need it.
Of course "it depends" and will not fit everywhere. Hence the preprocessor directive.
var task = GetAsync();
task.ConfigureAwait(false);
task.ContinueWith(t => SomeStuff(t)).ConfigureAwait(false);
return task;
I'm not even mad. The more I see people using the TPL, the more I think ConfigureAwait was a mistake from an API perspective.
var task = GetAsync();
task.ConfigureAwait(false);
task.ContinueWith(t => SomeStuff(t)).ConfigureAwait(false);
return task;
I'm not even mad. The more I see people using the TPL, the more I think ConfigureAwait was a mistake from an API perspective.
https://github.com/dotnet/runtime/issues/47525#issuecomment-785433180
#dotnet #csharp
https://github.com/dotnet/runtime/issues/47525#issuecomment-785433180
#dotnet #csharp
https://stackoverflow.com/a/59002568/1768303
https://stackoverflow.com/a/59002568/1768303
But all the "await" and ".ConfigureAwait(false)" are so... much. 😎
But all the "await" and ".ConfigureAwait(false)" are so... much. 😎
https://dev.to/noseratio/why-i-no-longer-use-configureawait-false-3pne
#dotnet="/hashtag/dotnetcore" class="hover:underline text-blue-600 dark:text-sky-400 no-card-link">#dotnetcore #dotnet #csharp
https://dev.to/noseratio/why-i-no-longer-use-configureawait-false-3pne
#dotnet="/hashtag/dotnetcore" class="hover:underline text-blue-600 dark:text-sky-400 no-card-link">#dotnetcore #dotnet #csharp
buff.ly/AsHDa9Z
#dotnet #csharp #async #programming
buff.ly/AsHDa9Z
#dotnet #csharp #async #programming
#dotnet
#dotnet
Mastering async and parallel programming are essential.
Before his training seminar in June, .NET MVP @jeremybytes.bsky.social sat down with @vsmdev.bsky.social to dig into critical C# concepts like ConfigureAwait(false) and Task.
visualstudiomagazine.com/articles/202...
Mastering async and parallel programming are essential.
Before his training seminar in June, .NET MVP @jeremybytes.bsky.social sat down with @vsmdev.bsky.social to dig into critical C# concepts like ConfigureAwait(false) and Task.
visualstudiomagazine.com/articles/202...