Why does the OnlyOnCanceled continuation get called?
问题 When calling await RunAsync(); on the below code, I would expect the continuation with TaskContinuationOptions.OnlyRanToCompletion continuation to run, however the OnlyOnCanceled continuation gets called (yielding the debug output "Task canceled"). Why? private static async Task RunAsync() { try { await Task.Run(() => DoWork()) .ContinueWith( (t) => { if (t?.Exception != null) { throw t.Exception; } }, TaskContinuationOptions.OnlyOnFaulted ).ContinueWith( (t) => { Debug.WriteLine("Task