菜单
  
    摘要:耗时的操作(如下载和数据库事务)在长时间运行时可能会导致用户界面 (UI) 似乎处于停止响应状态。这种耗时的操作,无论是I/O密集型操作,亦或是计算密集型操作,要做到最高效的使用系统资源,我们便可采取多线程操作,让这些运算在后台完成,完成后再给出提示。线程在后台运行的过程中,不妨碍用户操作主界面,必要时可以控制线程的操作。39072
    如果需要能进行响应的用户界面,而且面临与这类操作相关的长时间延迟,则可以使用 BackgroundWorker 类方便地解决问题。BackgroundWorker 类可在单独的专用线程上运行操作。利用.net中的BackgroundWorker控件,打开一个新的线程,把耗时的操作放在线程中执行,这样可以在用户界面上进行其他操作。新建的线程可以使用thread类,实现多线程的操作。
    简单的查阅相关资料后可以知道:创建一个 BackgroundWorker,侦听那些报告操作进度并在操作完成时发出信号的事件。若要为后台操作做好准备,则可添加 DoWork 事件的事件处理程序。 在此事件处理程序中调用耗时的操作。 若要收到进度更新的通知,对应处理 ProgressChanged 事件。 若要在操作完成时收到通知,对应处理 RunWorkerCompleted 事件。以上提到的事件是BackgroundWorker的三个重要事件……
    本论文即旨在从Backgroundworker出发,深入了解学习异步模式的原理和使用方法。
    毕业论文关键词:  并发执行;BackgroundWorker类;耗时的操作;异步
    Application of Backgroundworker in multi-threaded task
    Abstract:Time-consuming operations like downloads and database transactions can cause your user interface (UI) to seem as though it has stopped responding while they are running.This time-consuming operation, both I / O intensive operations, or calculation intensive operation, in order to achieve the most efficient use of system resources, we can take multi-threaded operation, so that these operations are done in the background. After the completion of the tips are given. The thread runs in the background, does not prevent the user to operate the main interface, when necessary, it can control the operation of the thread.
    When you want a responsive UI and you are faced with long delays associated with such operations, the BackgroundWorker class provides a convenient solution. The BackgroundWorker class allows you to run an operation on a separate, dedicated thread.Using BackgroundWorker, opening a new thread, executiving the time-consuming operation into the thread, so that other users can perform other interfaces. The newly created thread can use the thread class to implement the multithreaded operation.
    After a simple access to the relevant information can be aware that :To execute a time-consuming operation in the background, create a BackgroundWorker and listen for events that report the progress of your operation and signal when your operation is finished. To set up for a background operation, add an event handler for the DoWork event. Call your time-consuming operation in this event handler. To receive notifications of progress updates, handle the ProgressChanged event. To receive a notification when the operation is completed, handle the RunWorkerCompleted event.The events mentioned above are three important events for BackgroundWorker…
    This thesis here is to learn more about the principle and the use of asynchronous mode thoroughly ,starting from the Backgroundworker.
    Keywords: Concurrent execution ;The BackgroundWorker class ; Time-consuming operations ; Asynchronous
     目录
    1    绪论    3
    1.1    课题研究的目的    3
    1.2    课题研究的意义    3
    2    基础知识理解    3
    2.1    前言    3
  1. 上一篇:MATLAB列车信号分析系统设计
  2. 下一篇:光孤子的理论研究及其在通信中的应用
  1. HFSS法拉第笼对频率选择表面性能的影响

  2. HFSS偶极子天线的设计和仿真

  3. ADS射频能量收集电路设计LC匹配

  4. 激光对潜通信中激光光源...

  5. 导引头误差作用下对比例导引法影响特性研究

  6. zygo利用掠入射的方法对长平晶的计量测试

  7. 白光干涉条纹非对称性的分析与处理

  8. 巴金《激流三部曲》高觉新的悲剧命运

  9. 现代简约美式风格在室内家装中的运用

  10. 江苏省某高中学生体质现状的调查研究

  11. 中国传统元素在游戏角色...

  12. 上市公司股权结构对经营绩效的影响研究

  13. NFC协议物理层的软件实现+文献综述

  14. C++最短路径算法研究和程序设计

  15. 高警觉工作人群的元情绪...

  16. g-C3N4光催化剂的制备和光催化性能研究

  17. 浅析中国古代宗法制度

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回