One way to increase scalability of the server application is to run IO-bound operation (reading files, sockets, web requests, database requests etc) asynchronously. This does not mean run them in the ThreadPool which will just block threads while operation is being executed. The correct way is to use asynchronous API (BeginRead, BeginGetResponse, BeginExecuteReader etc). The problem is well described in CLR vi C# book.
Here is some article about asynchronous queries in Linq to SQL.
Are any ways to execute Nhibernate query asynchonously? What about Linq to NHibernate?
Thank you, Andrey
async
support is comming for NHibernate 4.2.0 and 5.0.0. nhibernate.jira.com/browse/NH-3971 – Greenquist