Articles Tagged “async/await”
3 articles tagged “async/await”, newest first.
-
Don't Wrap HttpClient in a using Block — Practical HTTP Communication in C# Business Apps (Creation Patterns, Timeouts, Retries)
Creating a new C# HttpClient with using on every request exhausts sockets, but making it static means it stops following DNS changes. This article walks thro...
-
WPF/WinForms async and the UI Thread on One Sheet
After await in WPF or WinForms, which thread runs your code? Covers Dispatcher.Invoke, ConfigureAwait(false), and why .Result and .Wait() deadlock.
-
A Practical Decision Table for C# async/await - Task.Run and ConfigureAwait
We organize C# async/await best practices - I/O waits, CPU work, Task.Run, ConfigureAwait(false), and fire-and-forget - complete with a decision table.