Faulted vs Canceled task status after CancellationToken.ThrowIfCancellationRequested
问题 Usually I don't post a question with the answer, but this time I'd like to attract some attention to what I think might be an obscure yet common issue. It was triggered by this question, since then I reviewed my own old code and found some of it was affected by this, too. The code below starts and awaits two tasks, task1 and task2 , which are almost identical. task1 is only different from task2 in that it runs a never-ending loop. IMO, both cases are quite typical for some real-life scenarios