void
CS-R1005An async
method with return type void
does not provide any reliable way to know if the intended task has been completed or not. It is a fire-and-forget method and provides no reliable way to handle any Exceptions should things go wrong. It is therefore suggested that your method have a return type Task
.
public async void ParallelProcessData(Data data)
{
// ...
}
public async Task ParallelProcessData(Data data)
{
// ...
}