#ConfigureAwait
After a short break I'm back with the new video on Dissecting the Code YouTube channel.

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?...
Dissecting ConfigureAwait in C#
YouTube video by Dissecting The Code
youtu.be
October 2, 2025 at 6:40 PM
sorry babe, no async anal tonight :(
September 24, 2025 at 8:07 PM
But the idea of providing a synchronous facade on top of what is by nature an asynchronous operation seems like a hack, and very specific to the app model (UI vs background, etc.) - this is why ConfigureAwait and SynchronizationContext's are such a pain to manage within the library code itself.
November 29, 2024 at 3:31 PM
Does it add .ConfigureAwait(false)?
I will try once I'm back at a computer...
December 29, 2024 at 8:10 AM
How would it know not to do the implicit await/ConfigureAwait(false), like the following or in UI code?
June 3, 2025 at 12:53 PM
The Kafka consumer will block the thread whilst it polls for work from the server.

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.
January 26, 2025 at 1:03 PM
Stephen Cleary has a good article about the new ConfigureAwait options in .NET 8. Take a look:
blog.stephencleary.com/2023/11/conf...
November 10, 2023 at 5:32 PM
Should i add ConfigureAwait(false) to all async methods in library code? https://old.reddit.com/r/dotnet/comments/1n92rd1/should_i_add_configureawaitfalse_to_all_async/

#dotnet
September 8, 2025 at 8:05 AM
Hmm, so I'd separate code into different files based on the need for ConfigureAwait(false)? Implicit and subtle.
June 3, 2025 at 1:28 PM
I would separate UI code and service code.

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.
June 3, 2025 at 1:50 PM
Found this in our codebase:

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.
November 17, 2024 at 5:13 PM
ConfigureAwait FAQ by Stephen Toub. #csharp #dotnet #async #programming https://lnkd.in/e6SQFF7
LinkedIn
lnkd.in
December 1, 2024 at 7:21 AM
It's not to late to have your say on what the .NET 6 version of `ConfigureAwait` might look like, the whole thread is worth going through:
https://github.com/dotnet/runtime/issues/47525#issuecomment-785433180
#dotnet #csharp
Developers can have access to more options when configuri...
Background and Motivation While it is currently possible ...
github.com
November 18, 2024 at 8:49 PM
These days, I no longer use ConfigureAwait(false) automatically/unconsciously even in my libraries:
https://stackoverflow.com/a/59002568/1768303
To run or not run ConfigureAwait(false) with both service...
I came across articles below regarding when and where to ...
stackoverflow.com
November 18, 2024 at 10:34 PM
It's just that not all Task<T>-returning methods need to be async/awaited, and thus doesn't need ConfigureAwait.
June 3, 2025 at 3:14 PM
I agree, I also like explicit-ness. For example I avoid default values for parameters. I prefer two overloads where the one with less args calls the other.

But all the "await" and ".ConfigureAwait(false)" are so... much. 😎
June 3, 2025 at 12:16 PM
@scott.hanselman.com I think the next Deep Dive should be on ConfigureAwait(false) 😂👀
November 19, 2024 at 3:59 PM
Hey #CSharp folks, what do you think about implicit await/ConfigureAwait(false) configured with a preprocessor directive?

#dotnet #async #await
June 3, 2025 at 11:11 AM
Blogged: Why I no longer use ConfigureAwait(false)
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
Why I no longer use ConfigureAwait(false)
This might be an unpopular opinion, but I'd like to share...
dev.to
November 18, 2024 at 9:36 PM
Should i add ConfigureAwait(false) to all async methods in library code? https://old.reddit.com/r/dotnet/comments/1n92rd1/should_i_add_configureawaitfalse_to_all_async/

#dotnet
September 5, 2025 at 11:45 AM
… I would write .ConfigureAwait(true) out of spite for the many deadlocks I had to handle in my career for it being the default case and here being the rare case where you want it true. I should thank you for the thread mentioning synchronization context off handedly.
May 7, 2025 at 8:19 AM
Serious about #CSharp?

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...
May 21, 2025 at 4:09 PM