Skip to content

async void

Question

Can you await an async void method?

Short interview answer

No. An async void method has no task for the caller to await. Use it only for event handlers; application code should generally return Task or Task<T>.

Detailed answer

Without a returned task, callers cannot await completion, compose the operation, or observe exceptions through normal task handling. Event handlers require void, which is the usual justified exception. An asynchronous method used by application code should expose a task so its lifetime and failures remain observable.

For example, an event handler may be async void SaveButton_Click(...) { await SaveAsync(); }; a service method should instead be async Task SaveAsync() so its caller can await and handle its completion.

Sources