O'Reilly logo

Microsoft® Visual J#™ .NET (Core Reference) by John/Longshaw, Andy Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Thread Pooling

In a client/server system, a single server process frequently has to handle requests from multiple clients. Ideally, the server will handle these requests in a concurrent manner, using threads. (Single-threaded servers tend to form bottlenecks and do not survive long in a commercial environment.)

But how many threads should a server create? This is a little like asking how long is a piece of string. One solution would be to create a new thread for every client request, process the request, and then destroy the thread when processing has completed. However, this approach has at least two drawbacks. The first is that thread creation and destruction is a moderately expensive operation. The second drawback concerns the number of threads: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required