如何在c#console中平行下载和上传来自互联网的视频片段? [英] how to download and upload video clips from internet parallely in c# console?

查看:91
本文介绍了如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆