Is it appropriate to use async void
method to start some long-living operation? I know Nito or Task.Run()
could be used to Run Task from non-async method. What is the difference? Are there any pitfalls?
By all that I mean, can I write like that:
async void bar()
{
try
{
//...
}
catch (Exception ex)
{
// no rethrowing here
}
}
void foo()
{
bar();
// will continue right after 1st await in bar()
baz();
}