软件构架师总结出的经验-c#异步调用的几种方式-经典啊(Software architect summed up the experience, -c# asynchronous calls in several ways - classic ah!).docVIP
- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
软件构架师总结出的经验-c#异步调用的几种方式-经典啊(Software architect summed up the experience, -c# asynchronous calls in several ways - classic ah!) First, we analyze the asynchronous processing environment You need to retrieve the return value in the current thread You do not need to get the return value in the current thread, but you still need to process the return value For the first case, you can continue to subdivide Starts the thread T in the current thread, then continues to perform other tasks in the current thread, and finally gets the return value of the T in the current thread Start the thread T on the current thread, and then continue to perform other tasks in the current thread R1, wait for T to finish, when T finishes, continue to implement the current thread in the other task R2, and finally obtain the return value of T Starts the thread T in the current thread. As long as T executes, it performs the task R, and finally gets the return value of T Ill give you an example below: 1.1 starts the thread T in the current thread, then continues to perform other tasks in the current thread, and finally gets the return value of the T in the current thread 01 using System; 02 using System.Collections.Generic; 03 using System.Linq; 04 using System.Windows.Forms; 05 using System.Threading; 06 using System.Runtime.Remoting.Messaging; 07 namespace FirstWF {08 09 static class Program 10 { 11 x summary 12 The main entry point for the / / / application. 13 x /summary 14 [STAThread] 15, static, void, Main () 16 { 17, AsyncFuncDelegate, caller = new, AsyncFuncDelegate (Func); 18 Console.WriteLine (Input number please...); 19, IAsyncResult, result = caller.BeginInvoke (Convert.ToInt32 (Console.ReadLine ()), null, null); 20 Console.WriteLine (Implement other tasks); 21 Thread.Sleep (7000); 22 Console.WriteLine (Implement, other, tasks, end...); 23 Console.WriteLine (Get users input); 24 Console.WriteLine (caller.EndInvoke (result)); 25 Console.ReadLine (); 26} 27, delegate, string, AsyncFuncD
您可能关注的文档
- 中医药对运动性疲劳恢复作用(Effect of traditional Chinese medicine on recovery of sports fatigue).doc
- 中印关系在中国外交战略中的地位及发展趋向分析(Analysis of the status and development trend of Sino Indian Relations in China's diplomatic strategy).doc
- 中世纪2 -详解特技触发条件(Medieval 2 - detailed trick trigger conditions).doc
- 专家给你100条生活秘笈 让你过得更健康快乐(Experts give you 100 Living Tips let you live a happy and healthy).doc
- 专升本英语名词词组和固定搭配(English noun phrases and fixed collocations).doc
- 专外总结(Special summary).doc
- 专业音响 - c-mark 舞台灯光的定义、作用及评论(Professional acoustics - definition, function and commentary of c-mark stage lighting).doc
- 快乐出发(Happy departure).doc
- 快速采聚能量密法(Quick gathering energy density method).doc
- 快速轻松过目不忘背单词(Fast and easy to recite words gifted with an extraordinary retentive memory).doc
- 软件架构师(software architect).doc
- 软件架构师应该知道的97件事 - csdn资讯(97 things that a software architect should know - CSDN information).doc
- 软考网络管理员谈防火墙及防火墙的渗透技术(Test the network administrator Technology about firewall and firewall penetration).doc
- 赛车驾驶技术(Racing driving skills).doc
- 赛斯说想像力(Seth says imagination).doc
- 认证培训之一微软.net程序员高级培训教程系列资料(Certification training Microsoft.Net programmers advanced training course series of information).doc
- 陕西黄河集团200mw晶硅太阳能电池生产线建设项目环评公告(Shaanxi the Yellow River group 200MW crystalline silicon solar cell production line construction project EIA announcement).doc
- 邵阳崀山(Shaoyang Lang Mountain).doc
- 设备控制基础习题(Equipment control basic exercises).doc
- 设备搬迁方案(Equipment removal plan).doc
文档评论(0)