【发布时间】:2011-07-16 08:35:07
【问题描述】:
我正在使用此方法进行并发下载。
public void DownloadConcurrent(Action Method)
{
Action[] methodList = new Action[Concurent_Downloads];
for (int i = 0; i < Concurent_Downloads; i++)
{
methodList[i] = Method;
}
Parallel.Invoke(methodList);
}
我正在尝试同时下载 url,但活动下载次数始终为 1。
好像所有的下载都会调用,但只有一个 url 会开始下载数据,而不是所有的都会开始下载。
我希望所有下载同时进行,但无法实现。
更新:该方法使用队列,它正在下载不同的 url,形成队列。
【问题讨论】:
-
Action 委托中的代码是什么样的?
标签: c# .net windows download webclient