What is the meaning of thread-agility in ASP.Net?

后端 未结 1 417
有刺的猬
有刺的猬 2020-11-27 21:57

I am reading an article about HttpContext and CallContext and see thread-agility. What does it mean?

相关标签:
1条回答
  • 2020-11-27 22:14

    It means that IIS is free to use more than one thread to handle a single request, although not in parallel.

    Basically, IIS tries to perform I/O operations asynchronously, thus freeing the calling thread for the duration of the operation. That thread is returned to the pool and can be used to handle other requests in the meantime.

    When the asynchronous I/O operation completes, control can be returned to a thread other than the one that originally handled the request (since that thread can be busy elsewhere), so the request can continue being processed as soon as possible.

    0 讨论(0)
提交回复
热议问题