Thread.Start starts a new OS thread to execute the delegate. When the delegate returns, the thread is destroyed. This is quite a heavy-weight operation (starting and destroying a thread) so you typically only do it if the method is going to be long-running.

Delegate.BeginInvoke will call the delegate on a thread pool thread. Once the method returns, the thread is returned to the pool to be reused by another task. The advantage of this is that queueing a method to the thread pool is relatively light-weight because you don't have to spin up a whole new thread every time.

Control.BeginInvoke invokes the method on the thread for the control. UI components are inherently single-threaded and every interaction with a UI control must be done on the thread that created it. Control.BeginInvoke is a handy way to do that.

Thread.Start和Delegate.BeginInvoke 以及Control.BeginInvoke的更多相关文章

  1. C#Delegate.Invoke、Delegate.BeginInvoke And Control.Invoke、Control.BeginInvoke

    作者:EasonLeung 一.Delegate的Invoke.BeginInvoke 1.Delegate.Invoke (委托同步调用) a.委托的Invoke方法,在当前线程中执行委托. b.委 ...

  2. C# Control.BeginInvoke、synchronizationcontext.post、delegate.BeginInvoke的运行原理

    背景 用到的知识点 1.windows消息机制 备注:鼠标点击.键盘等事件产生的消息要放入系统消息队列,然后再分配到应用程序线程消息队列.软件PostMessage的消息直接进入应用程序线程消息队列, ...

  3. C#中的线程三 (结合ProgressBar学习Control.BeginInvoke)

    C#中的线程三(结合ProgressBar学习Control.BeginInvoke) 本篇继上篇转载的关于Control.BeginInvoke的论述之后,再结合一个实例来说明Cotrol.Begi ...

  4. C#中的线程二(Cotrol.BeginInvoke和Control.Invoke)

    C#中的线程二(Cotrol.BeginInvoke和Control.Invoke) 原文地址:http://www.cnblogs.com/whssunboy/archive/2007/06/07/ ...

  5. Control.Invoke和Control.BeginInvoke

    问题的引入 下面有个简单的demo,大家一看代码就知道效果如何示例.我新建一个winform的程序,然后写入了如下代码: using System; using System.Windows.Form ...

  6. WinForm二三事(三)Control.Invoke&Control.BeginInvoke

    http://www.cnblogs.com/yuyijq/archive/2010/01/11/1643802.html 这个系列从2009年写到2010年,差点又成太监文.随着WPF/Silver ...

  7. 千万别在UI线程上调用Control.Invoke和Control.BeginInvoke,因为这些是依然阻塞UI线程的,造成界面的假死

    原文地址:https://www.cnblogs.com/wangchuang/archive/2013/02/20/2918858.html .c# Invoke和BeginInvoke 区别 Co ...

  8. delegate的Invoke和BeginInvoke方法

    C#中的控件和delegate委托方法都有Invoke和BeginInvoke方法,控件的这两个方法网上讲得很多, 这里就不多说了,下面讲一下delegate的Invoke和BeginInvoke方法 ...

  9. (转)c# control.Invoke control.BeginInvoke

    在Invoke或者BeginInvoke的使用中无一例外地使用了委托Delegate. 一.为什么Control类提供了Invoke和BeginInvoke机制? 关于这个问题的最主要的原因已经是do ...

随机推荐

  1. jQuery中的ajax用法案例

    什么是 AJAX? AJAX = 异步 JavaScript 和 XML(Asynchronous JavaScript and XML). 简短地说,在不重载整个网页的情况下,AJAX 通过后台加载 ...

  2. go练习3 --map的操作

    func T2_1() {     // 键值string , 值 int 类型     m1 := map[string]int{}     //添加一个元素     m1["str1&q ...

  3. 网络费用流-最小k路径覆盖

    多校联赛第一场(hdu4862) Jump Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Ot ...

  4. springMVC各个包下的作用

    spring的jar各包作用spring.jar是包含有完整发布的单个jar包,spring.jar中包含除了spring-mock.jar里所包含的内容外其它所有jar包的内容,因为只有在开发环境下 ...

  5. 170522、Linux 平台通过 nginx 和 vsftpd 构建图片服务器

    Nginx WEB 服务器 Nginx 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器. Nginx 是由 Igor Sysoev 为俄罗斯访问量第 ...

  6. 《挑战程序设计竞赛》2.5 最小生成树 POJ3723 3169 1258 2377 2395 AOJ2224(1)

    POJ3723 http://poj.org/problem?id=3723 题意 windy要组建一支军队,召集了N个女孩和M个男孩,每个人要付10000RMB,但是如果一个女孩和一个男孩有关系d的 ...

  7. Python绘图教程

    1.二维绘图 a. 一维数据集 用 Numpy ndarray 作为数据传入 ply 1. import numpy as np import matplotlib as mpl import mat ...

  8. stark - filter、pop、总结

    一.filter 效果图 知识点 1.配置得显示Filter,不配置就不显示了 list_filter = ['title','publish', 'authors'] 2.前端显示 后端返回 字典 ...

  9. ARM上电启动及Uboot代码分析

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/qianlong4526888/article/details/27698707 注意:由于文档是去年 ...

  10. C#基础笔记(第九天)

    1.面向过程<-->面向对象面向过程:面向的是完成这件事儿的过程,强调的是完成这件事儿的动作. 面向对象:找个对象帮你做事儿.意在写出一个通用的代码,屏蔽差异. 每个人都有姓名,性别,身高 ...