I have a function that isn't async
and as a result I can't use await
. In that function I call a function that's async
.
My coworker suggested I use:
private void Foo()
{
var _ = BarAsync();
}
This way however has the disadvantage that I don't get notified when the function throws errors. Is there a better way to call the function? I don't care whether or not the function gets executed asyncronly.