I am implementing IAsyncDisposable which requires me to return a ValueTask, but sometimes my dispose method has nothing to do. How should I return
IAsyncDisposable
ValueTask
All structs have a default constructor. The default constructor of ValueTask creates a completed ValueTask:
var completedValueTask = new ValueTask();
Or alternatively:
ValueTask completedValueTask = default;