l Image downloads
l Web service invocations
l File downloads and uploads (including for peer-to-peer applications)
l Complex local computations
l Database transactions
l Local disk access, given its slow speed relative to memory access
这个时候UI就会陷入一种假死的状态,会给用户带来一种很不好的体验. 如何在这里发挥多线程的优势以改善用户体验? .Net2.0的System.ComponentModel.BackgroundWorker为我们提供了一个很方便的解决方法.
BackgroundWorker内部实现是基于delegate的异步调用.