CancellationTokens
In C# asynchronous programming, a CancellationToken allows you to stop a Task. This is especially useful if you have many Tasks running and want to gracefully shut down the program, or if you want to add a timeout to a Task. via GIPHY Creation CancellationTokens are created from a CancellationTokenSource. via GIPHY Usage The token … [Read more…]