本文介绍了多个同时上传到单个目的地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我已经成功创建了一个允许我进行异步文件上传的类。因此,我可以管理多个上传。我发现,如果我尝试上传更多的2个文件,第三个(或后续)上传类似的等待,直到两个完成。这意味着我只能同时向目的地进行最多2次上传。

是否需要这种行为?

我使用FtpWebRequest&用于管理上传的FtpWebResponse类。 ftp以同步方式完成,但是在单独的线程上完成。管理它的类还具有除FTP之外的一些其他功能。因此,我不使用线程池来执行我的线程工作。我使用Thread类来完成我的线程工作。


我是一堆错误交织在一起的好意图

I've successfully created a class that allows me to do asynchronous file uploading. Because of this I am able to manage multiple uploads. I find that if I am trying to upload more that 2 files, the third (or consequent) uploads kind of wait until either to the two finish. Which means I can only do max 2 uploads to a destination simultaneously.

Is this behavior expected?

I use FtpWebRequest & FtpWebResponse classes to manage the uploading. The ftp is done in a synchronous fashion but on a separate thread. The class that manages this also has some other functionality apart from FTP-ing. Hence I don't use the thread pool to do my threading work. I use the Thread class to do my threading work.


I am a bundle of mistakes intertwined together with good intentions

推荐答案


这篇关于多个同时上传到单个目的地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 13:10