Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 339
masoud ramezani Avatar asked Jul 03 '12 08:07

masoud ramezani


1 Answers

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.

like image 126
Frédéric Hamidi Avatar answered Sep 23 '22 21:09

Frédéric Hamidi