铁啪唧煎鸡蛋

博客园 首页 新随笔 联系 订阅 管理

2014年3月6日 #

摘要: Consider a type that will print out a message when it’s finalized, and that has a Dispose method which will suppress finalization:class DisplayOnFinalize : IDisposable { public void Dispose() { GC.SuppressFinalize(this); } ~DisplayOnFinalize() { Console.WriteLine(“Finalized”); } }Now consider a si.. 阅读全文
posted @ 2014-03-06 10:36 铁啪唧煎鸡蛋 阅读(207) 评论(0) 推荐(0) 编辑

摘要: It’s been awesome seeing the level of interest developers have had for the Async CTP and how much usage it’s getting. Of course, with any new technology there are bound to be some hiccups. One issue I’ve seen arise now multiple times is developers accidentally deadlocking their application by blocki 阅读全文
posted @ 2014-03-06 10:35 铁啪唧煎鸡蛋 阅读(202) 评论(0) 推荐(0) 编辑

摘要: From time to time, I receive questions from developers which highlight either a need for more information about the new “async” and “await” keywords in C# and Visual Basic. I’ve been cataloguing these questions, and I thought I’d take this opportunity to share my answers to them.Conceptual OverviewW 阅读全文
posted @ 2014-03-06 10:32 铁啪唧煎鸡蛋 阅读(402) 评论(0) 推荐(0) 编辑

摘要: 在最近发布的使用 Windows 运行时中异步性来始终保持应用程序能够快速流畅地运行这篇博文中,包含了一些如何在 C# 和 Visual Basic 中使用 await 关键字的示例,允许开发人员在使用 WinRT 异步操作的同时,保持和推导良好的控制流。在接下来的博文中,我将更加深入地介绍 await 在 WinRT 中的工作原理。这些知识将帮助您更轻松地推导使用 await 的代码,进而帮助您编写更出色的 Metro 风格应用程序。首先,我们先来审视一下没有 await 的情况。基础知识回顾WinRT 中的所有异步功能全部源自同一个接口:IAsyncInfo。public interfac 阅读全文
posted @ 2014-03-06 10:26 铁啪唧煎鸡蛋 阅读(324) 评论(1) 推荐(0) 编辑