如何在c#console中平行下载和上传来自互联网的视频片段? [英] how to download and upload video clips from internet parallely in c# console?
问题描述
大家好,
我有从网上下载和上传视频片段的问题,我已经使用了webClient,这是单文件下载和上传。我想使用threadPool同时下载和上传两个或多个文件。请回复
来解决这个问题... :( :()
I have problem with download and upload of video clips from internet, i already used the concept of webClient ,this is working single file download and upload.I want threadPool to be used to download and upload the two or more files concurrently. pls reply to this problem... :( :()
谢谢
推荐答案
线程childThread1 =新线程(()=> down.downloadFile(sourceFile,targetPath));
childThread1.Start();
线程childThread2 = new Thread(()=> up.uploadFile());
childThread2.Start();
Thread childThread1 = new Thread(() => down.downloadFile(sourceFile,targetPath));
childThread1.Start();
Thread childThread2 = new Thread(() => up.uploadFile());
childThread2.Start();
正在创建这样的线程。
这篇关于如何在c#console中平行下载和上传来自互联网的视频片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!