6
ASP.NET MVC 2 비동기 컨트롤러에서 다음과 같은 작업을 수행 할 수 있습니다.ASP.NET MVC 2 비동기 컨트롤러에서 Action Filters를 비동기 적으로 실행합니까?
public class SomeController : AsyncController
{
[Blurb]
public void FooAsync()
{
this.AsyncManager.OutstandingOperations.Increment();
Task.Factory.StartNew(
() =>
{
this.AsyncManager.Parameters["result"] = new BazResult();
this.AsyncManager.OutstandingOperations.Decrement();
});
}
public ActionResult FooCompleted(ActionResult result)
{
return result;
}
}
제 질문은이 경우 "Blurb" 필터가 비동기 적으로 실행됩니까? 다시 말해, 동기식 특성이 자동으로 비동기 호출로 래핑됩니까?
그래서 필터가 또 다른 스레드에서 실행됩니까? BeginInvoke가 스레드 풀 스레드를 사용하지 않습니까? 비동기 호출의 목적을 무효화하지 않습니까? –
제 생각에 비동기 호출은 웹 요청과 동일한 스레드 풀을 사용하지 않으므로 IIS는 스레드 기아 상태에 직면하지 않습니다. –