'How does a request cancellation token actually get marked for cancellation?
I'm looking for some more information on what actually causes IsCancellationRequested to become set for a cancellation token.
I see plenty of articles and videos stating to just throw the token in a httpClient.PostAsync() call and then we can check the property of IsCancellationRequested on the token that we pass in and do our cancellation processing if it's requested. I also see that we can use the token source to call cancel for it as well.
My confusion here is around me sending a request to an endpoint that I own and what triggers the IsCancellationRequested property to become set as true on my response. Will this become set as true on any exception thrown? And is this only possible to set as true on an exception being thrown? I don't full understand the role the server has in requesting a cancellation.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
