Limit Threads count
问题 I have a List with items that I want to download. I use a for Loop to iterate the list. For each item in this List I start a new Thread that references the item. My Problem is that I want limit the maxDownload at the same time. for (int i = downloadList.Count - 1; i >= 0; i--) { downloadItem item = downloadList[i]; if (item.Status != 1 && item.Status != 2) { ThreadStart starter = delegate { this.DownloadItem(ref item); }; Thread t = new Thread(starter); t.IsBackground = true; t.Name = item