I had troubles with a Task that I used ContinueWith on. In the callback, I did not observe/handle the Exception when the first task was faulted. I found out what happens in this case here:
Proper way to use .ContinueWith for Tasks
Keep in mind that, if your own continuations don't observe the exception, the person who is waiting on this overall workflow to complete is going to be the one observe it.
Which made me wonder:
Who is the waiter of a Task that is not awaited?
Who is waiting for a Task by default?
For example:
public int HowOldAmI()
{
Task t = Task.Run(async () => {
await Task.Delay(5000);
throw new Exception("Something happened");
});
return 42;
}
In this case, who is waiting for the Task?