public void ParallelDownloader() { var downloader = new HttpClientDownloader(); Parallel.For(0, 3, new ParallelOptions { MaxDegreeOfParallelism = 3 }, i => { var d = downloader.Clone(); downloader.Download(new Request("http://www.163.com")); }); }
public void ParallelDownloader() { var downloader = new HttpClientDownloader(); Parallel.For(0, 3, new ParallelOptions { MaxDegreeOfParallelism = 3 }, i => { var d = downloader.Clone(); downloader.Download(new Request("http://www.163.com")); }); }