Description
Description
We can find async void
methods in the source code. Those methods are associated with fire and forget behaviors. There is no way to wait for their end and response accordingly.
async void
methods should be used only for event handling.
Instead, async void
should be replaced by async Task
.
Concerned code
- Whole Solution, there is currently 205 occurences of
async void
.
Gains
- An ability to use
await
onasync
methods we could not before. - Removing a code smell from the base.
Requirements
- If an
async void
method is detected, make it into aasync Task
method. - Be wary of
async void
event handlers. They can stay as is.
Comments
No response
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done