Created
December 9, 2011 13:33
-
-
Save biac/1451540 to your computer and use it in GitHub Desktop.
LongTimeMethodAsync() キャンセル可能バージョン
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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