I have this construct in my main(), which creates
var tasks = new List();
var t = Task.Factory.StartNew(
async () =>
{
It seems like I get desired functionality by Unwrap()ing the task.
I'm not quite sure I get the reasoning behind this, but I suppose it works.
var t = Task.Factory.StartNew(
async () =>
{
Foo.Fim();
await Foo.DoBar();
}).Unwrap();
edit: I've looked for ddescription of Unwrap():
Creates a proxy Task that represents the asynchronous operation of a Task
I thought this was traditionally what the task did, but if I need to call unwrap I suppose that's fine.