winform多文件上传,如何操作一个文件的暂停、继续、取消
多文件上传已写好,使用了Semaphore semahoro = new Semaphore(3, 3);
来控制线程运行数目。
for (int i = 0; i < Up_Thread.up_file_value_list.Count; i++)
{
HttpUpFile hf = new HttpUpFile();
Up_Thread.threads = new Thread(new ParameterizedThreadStart(hf.draw));
Up_Thread.threads.IsBackground = true;
Up_Thread.threads.Start(Up_Thread.up_file_value_list[i]);
}