【发布时间】:2012-08-08 07:32:59
【问题描述】:
我正在编写一个 FTPS 框架。用户(使用我的框架的程序员)应该可以异步下载文件(在另一个 Thread 中)。所以,我的大问题是,程序员无法处理Exceptions 中抛出的DownloadFile-transfer-Thread 中的方法:
- 当我要求AsyncCallback 告诉程序下载传输完成时,“他”如何处理Exceptions(来自他的Thread)?
- BackgroundWorker也有同样的问题,另外程序员要给我RunWorkerCompletedEventHandler(object, RunWorkerCompletedEventArgs)
谢谢!
【问题讨论】:
标签: c# multithreading exception exception-handling