The benefit is that if that operation is truly asynchronous then at some point the calling thread will be freed to do other work in your application instead of being blocked synchronously.
That kind of usage brings higher scalability.
You're still waiting until the operation completes before moving on. Async methods don't magically run faster, but they do potentially use less resources and you can usually run multiple ones concurrently.
If we imagine that CreateAsync
looks like this:
async Task<IdentityResult> CreateAsync()
{
// do something
await Task.Delay(1000);
// do something else
}
Then at await Task.Delay(1000)
you free up a thread and wait asynchronously instead of holding on to it for a second. That thread can execute other CPU operations in your process and avoid a context switch.
If CreateAsync
is implemented right then there is some actual asynchronous operation instead of that Task.Delay