typo: 'out weights' -> 'out weighs' (#10162)
parent
2f2ee9eccc
commit
c563c67985
|
@ -4,7 +4,7 @@ title: "Using Asynchronous Methods in ASP.NET 4.5 | Microsoft Docs"
|
|||
author: Rick-Anderson
|
||||
description: "This tutorial will teach you the basics of building an asynchronous ASP.NET Web Forms application using Visual Studio Express 2012 for Web, which is a free..."
|
||||
ms.author: riande
|
||||
ms.date: 06/06/2012
|
||||
ms.date: 01/02/2019
|
||||
ms.assetid: a585c9a2-7c8e-478b-9706-90f3739c50d1
|
||||
msc.legacyurl: /web-forms/overview/performance-and-caching/using-asynchronous-methods-in-aspnet-45
|
||||
msc.type: authoredcontent
|
||||
|
@ -62,7 +62,7 @@ In general, use asynchronous methods for the following conditions:
|
|||
- The operations are network-bound or I/O-bound instead of CPU-bound.
|
||||
- Parallelism is more important than simplicity of code.
|
||||
- You want to provide a mechanism that lets users cancel a long-running request.
|
||||
- When the benefit of switching threads out weights the cost of the context switch. In general, you should make a method asynchronous if the synchronous method blocks the ASP.NET request thread while doing no work. By making the call asynchronous, the ASP.NET request thread is not blocked doing no work while it waits for the web service request to complete.
|
||||
- When the benefit of switching threads outweighs the cost of the context switch. In general, you should make a method asynchronous if the synchronous method blocks the ASP.NET request thread while doing no work. By making the call asynchronous, the ASP.NET request thread is not blocked doing no work while it waits for the web service request to complete.
|
||||
- Testing shows that the blocking operations are a bottleneck in site performance and that IIS can service more requests by using asynchronous methods for these blocking calls.
|
||||
|
||||
The downloadable sample shows how to use asynchronous methods effectively. The sample provided was designed to provide a simple demonstration of asynchronous programming in ASP.NET 4.5. The sample is not intended to be a reference architecture for asynchronous programming in ASP.NET. The sample program calls [ASP.NET Web API](../../../web-api/index.md) methods which in turn call [Task.Delay](https://msdn.microsoft.com/library/hh139096(VS.110).aspx) to simulate long-running web service calls. Most production applications will not show such obvious benefits to using asynchronous Methods.
|
||||
|
|
Loading…
Reference in New Issue