메뉴 건너뛰기

게임 커뮤니티 4브론즈

IT 해외 뉴스

本文翻译于Stephen Toub的这篇英文文章:How Async/Await Really Works in C# – .NET Blog (microsoft.com) 几周前,.NET Blog刊登了一篇文章 什么是 .NET,为什么要选择它?。它提供了对平台的高层次概述,总结了各种组件和设计决策,并承诺对所涉及的领域发表更深入的文章。这是第一篇这样的后续文章,深入探讨了C#和.NET中async/await的历史、背后的设计决策和实现细节。 对async/await的支持已经存在了十年之久。在这段时间里,它改变了为.NET编写可扩展代码的方式,而在不了解其底层逻辑的情况下使用该功能是可行的,也是非常常见的。你可以从一个像下面这样的同步方法开始(这个方法是“同步的”,因为调用者将无法做其他任何事情,直到整个操作完成并将控制权返回给调用者): // Synchronously copy all data from source to destination. public void CopyStreamToStream(Stream source, Stream destination) { var buffer = new byte[0x1000]; int numRead; while ((numRead = source.Read(buffer,


원문출처 : https://devblogs.microsoft.com/dotnet-ch/async-await%E5%9C%A8-c%E8%AF%AD%E8%A8%80%E4%B8%AD%E6%98%AF%E5%A6%82%E4%BD%95%E5%B7%A5%E4%BD%9C%E7%9A%84
번호 제목 글쓴이 날짜 조회 수
공지 자동수집 대상 사이트 KanoT 2023.02.14 2158
347 [DevBlogs] Teams Toolkit for Visual Studio Code Update – April 2023 뉴스봇 2023.04.20 437
346 [DevBlogs] Git Tooling Preview Features to Enhance Productivity 뉴스봇 2023.04.20 314
345 [DevBlogs] The case of the unhandled exception in a brokered Windows Runtime component 뉴스봇 2023.04.19 349
344 [Stack Overflow] Ops teams are pets, not cattle 뉴스봇 2023.04.19 217
343 [DevBlogs] 更新WinForm’s InitializeComponent的现代代码生成 뉴스봇 2023.04.19 1096
342 [DevBlogs] Announcing TypeScript 5.1 Beta 뉴스봇 2023.04.19 1377
341 [DevBlogs] DirectStorage 1.2 Available Now 뉴스봇 2023.04.19 1047
340 [DevBlogs] OData property changes to callRecords change notifications in Microsoft Graph 뉴스봇 2023.04.19 1492
339 [Godot] Godot 4.1 Rendering Priorities 뉴스봇 2023.04.19 197
338 [DevBlogs] Functional exception-less error handling with C++23’s optional and expected 뉴스봇 2023.04.19 238
337 [DevBlogs] Money Talks: Chatting With Your Favorite 10-K 뉴스봇 2023.04.19 674
336 [DevBlogs] Azure SDK Release (April 2023) 뉴스봇 2023.04.19 640
335 [Stack Overflow] We bought a university: how one coding school doubled down on brick and mortar (Ep. 555) 뉴스봇 2023.04.18 663
334 [DevBlogs] No, it is not a security vulnerability that there is no certificate of appreciation for reporting a bug 뉴스봇 2023.04.18 407
333 [Stack Overflow] Introducing Communities on Teams: where domain, practice, and community come together with purpose 뉴스봇 2023.04.18 1054
» [DevBlogs] Async/Await在 C#语言中是如何工作的 뉴스봇 2023.04.18 317
331 [DevBlogs] Semantic Kernel Now Available In Python Flavor 뉴스봇 2023.04.18 1348
330 [DevBlogs] Running non-root .NET containers with Kubernetes 뉴스봇 2023.04.18 349
329 [Stack Overflow] Community is the future of AI 뉴스봇 2023.04.18 1019
328 [DevBlogs] How can I find the invalid class when C++/WinRT tells me that the class may not be final? 뉴스봇 2023.04.17 334
위로