Using async/await with a custom thread pool

Published on

Async/await has a potential to dramatically simplify any C# code that relies on asynchronous methods. Its downside is that it is heavily tied into the threading model of whatever kind of application you are developing: console (system thread pool) vs. WPF vs. WinForms etc. – each of these execute the continuations somewhat differently. This article demonstrates how to control this behavior, so that you can direct the continuations to threads of your choosing.