Tag Archives: Threading

Will it block? Debunking async/await pitfalls

With classes and methods such as Task.Run, Task.Factory.StartNew, TaskScheduler, SynchronizationContext, ThreadPool and others it’s very easy to get confused by all the ways to distribute work between the UI thread and background threads in the .NET framework using C#. However, if you follow some easy rules and avoid some pitfalls, the TPL (Task Parallel Library) and the async/await keywords greatly simplify development of reactive user interfaces.

A screenshot of the "Tasks" window in front of source code
Debugging parallel code

Continue reading Will it block? Debunking async/await pitfalls