Skip to content

Instantly share code, notes, and snippets.

@biac
Created December 9, 2011 13:33
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 biac/1451540 to your computer and use it in GitHub Desktop.
Save biac/1451540 to your computer and use it in GitHub Desktop.
LongTimeMethodAsync() キャンセル可能バージョン
public static Task<int> LongTimeMethodAsync(int n, CancellationToken token)
{
return Task.Factory.StartNew<int>(() => LongTimeMethod(n, token), token);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment