Developer Support

Advocacy and Innovation

Recommended patterns for CancellationToken

Whether you're doing async work or not, accepting a CancellationToken as a parameter to your method is a great pattern for allowing your caller to express lost interest in the result. Supporting cancelable operations comes with a little bit of extra responsibility on your part. Optional CancellationToken ...