How do I call an async method from a synchronous one, without deadlocking? Writing async code whenever possible is great, but how do we do it when we're stuck with legacy (and very synchronous) code?
Turning a BackgroundWorker into a Task with TaskCompletionSource Sometimes the safer way to "update" old code is to leave it be and paint over it with a newer construct. Let's see how to modernize a BackgroundWorker using Tasks and TaskCompletionSource.
Using Async, Await, and Task to keep the WinForms UI responsive Using the async/await pattern in WinForms is an easy win, helping prevent one of the most annoying user experiences - a frozen UI.