title: What is the benefit of mixing io-bound and cpu bound operations
body: <p>This is the excerpt of the sign-in operation in <strong>Asp.Net Identity</strong>:</p>
  
  <pre><code>protected virtual async Task&lt;PasswordVerificationResult&gt; VerifyPasswordAsync(IUserPasswordStore&lt;TUser&gt; store, TUser user, string password)
  {
      var hash = await store.GetPasswordHashAsync(user, CancellationToken);
      if (hash == null)
      {
          return PasswordVerificationResult.Failed;
      }
  
      return PasswordHasher.VerifyHashedPassword(user, hash, password);
  }
  </code></pre>
  
  <ol>
  <li>The <code>VerifyHashedPassword(...)</code> method is CPU-bound and is blocking. Is there any benefit of using the async <code>GetPasswordHashAsync(...)</code> call if <code>VerifyHashedPassword(...)</code> depends on its result?</li>
  <li>Shouldn't the <code>await Task.Run(() =&gt; DoSomeWork());</code> construction be used instead (if inside the controller action)? </li>
  </ol>