Can I propagate cancellation without throwing task cancelled exceptions?

Bloqueada Can I propagate cancellation without throwing task cancelled exceptions?

  • lunes, 16 de julio de 2012 19:43
     
     

    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?

Todas las respuestas