Cooperatively pausing async methods
Recently I was writing an app that processed a bunch of files asynchronously. As with the Windows copy file dialog, I wanted to be able to provide the user with a button that would pause the processing operation.To achieve that, I implemented a simple mechanism that would allow me to pass a “pause token” into the async method, whi...