asynchronus C#FTP处理 [英] asynchronus C# FTP processing

查看:93
本文介绍了asynchronus C#FTP处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



目前我有一个FTP进程,可以抓取特定FTP文件位置上存在的多个文件,然后将它们拉下来并下载它们。根据规格更改而不是发送多个文件,他们将发送一个大文件。有没有关于如何使用线程为某些订单项/记录进行异步处理来提取这些文件的建议,例如5000条记录



任何帮助将不胜感激

解决方案

通过从同一服务器并行下载文件,无法真正提高吞吐量。 (从不同的服务器,是的,每个服务单独的一个线程可以在一定程度上提供帮助。这取决于瓶颈在哪里。如果你的本地带宽很低,即使这可能没有帮助。)



但是,当然,如果你在某个UI中有它,你的下载代码应该在一个单独的线程中执行,而不是UI线程。



-SA

Hello,

Currently I have an FTP process that grabs as many files that exist on the specific FTP file location and then pulls them down and downloads them. Based on specs changing instead of sending multiple files they are going to send one big file. Is there any suggestions on how to pull these files using threading for asynchronous processing for a certain amount of line items/records, for example 5000 records

any help would be appreciated

解决方案

You cannot really improve throughput by parallel downloading of the files from the same server. (From different servers, yes, a separate thread per service could help, to certain extent. It depends where is the bottleneck. If you have low local bandwidth, even this may not help.)

But of course, if you have it in some UI, your download code should be executed in a separate thread, not the UI thread.

—SA


这篇关于asynchronus C#FTP处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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