When you write long-running code in .NET — for example, downloading files, processing data, or reading from a database — sometimes you…