Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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