Skip to content

Instantly share code, notes, and snippets.

@biac
Created December 7, 2011 02:55
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/1441226 to your computer and use it in GitHub Desktop.
Save biac/1441226 to your computer and use it in GitHub Desktop.
FeedReader: 並列処理の実装 (gist:1437510の改良版)
public async Task<IList<FeedData>> ReadAsync(string[] feedUrlStrings)
{
IEnumerable<Task<FeedData>> readAsyncTasks = feedUrlStrings.Select(
url => this.ReadAsync(url)
);
return (await Task.WhenAll(readAsyncTasks));
}
//参考: http://download.microsoft.com/download/5/B/9/5B924336-AA5D-4903-95A0-56C6336E32C9/TAP.docx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment