Skip to main content
Visual C++ Samples 
PooledAsync Sample: Increases Performance with an Additional Thread Pool 

Download sample

Demonstrates how to increase Web application and SOAP service availability and performance with an additional thread pool.

The PooledAsync sample contains two closely related samples demonstrating how to increase Web application and SOAP service availability and performance by incorporating an additional thread pool.

By default, the ATL Server framework provides very high performance by using a thread pool in the ISAPI Extension to handle incoming requests. If any of these requests takes a long time to complete, however, the possibility arises that the application or service will become unresponsive to additional requests. This situation may occur when a high percentage of the threads in the primary pool (in the ISAPI Extension) are busy with long-running tasks (validating credit cards, calling another SOAP server, and so on).

The solution demonstrated in this sample is to implement an additional thread pool and use ATL Server's asynchronous features to offload these long-running tasks.

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

Building and Running the Sample

To build and run this sample

  1. Open the solution file, PooledAsync.sln, in the Visual Studio development environment.

  2. Build the solution. This will also deploy the solution to the local Web server.

  3. Use a Web browser to view http://localhost/pooledasync/index.htm. Use the links on the page to test the different ways that the Web application DLL provides for returning data to the client.

  4. Open a command prompt in the folder that holds the SOAP client application, PooledAsyncSoapClient.exe, and run the application to test the ways that the XML Web service DLL provides for returning data to the client.


See Also

Other Resources

ATL Server Samples