Creating a Task in .NET
Creating a Task in .NET
Today I found something surprising - a piece of code in C# which awaited a new Task(...)
and which achieved its goal, but did the opposite of what I expected. Indeed, instead
of the task running to completion, it instead never completed. In this post I'll share
some interesting empirical observations about how this works and talk about how this
differs from asynchronous execution systems in other languages.