locked
Can I propagate cancellation without throwing task cancelled exceptions? RRS feed

  • Question

  • Currently when I want to indicate an async method was cancelled, I throw a task cancelled exception. An unfortunate side effect of this is it triggers a bunch of functionality in visual studio (debug output, intellitrace event, etc). As a result, I see small hiccups when debugging the project. The same thing happens when an awaited thing is cancelled (a TaskCancelledException is thrown and swallowed immediately by the next level).

    Is there a better way to propagate cancellation in async methods?

    Monday, July 16, 2012 7:43 PM

Answers