Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var token = new CancellationTokenSource();
string result = await OperationAsync(param1, param2, param3, token.Token);
// at some point later, potentially on another thread
token.Cancel();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment