Skip to content

Instantly share code, notes, and snippets.

@jesuscampos
Last active October 13, 2018 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesuscampos/5a0ca1ddcc4c12d2f750537fe98b67ed to your computer and use it in GitHub Desktop.
Save jesuscampos/5a0ca1ddcc4c12d2f750537fe98b67ed to your computer and use it in GitHub Desktop.
public long DoWork(int n)
{
// CPU-Bound work
// ...
return fibonacciNumber;
}
public Task<long> DoWorkAsync(n)
{
return Task.Run(() => DoWork(n));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment