Additional Functionality to Consider

Chapter 13 - Thread Pooling

Java Thread Programming
Paul Hyde
  Copyright 1999 Sams Publishing

Summary
Thread pooling can be used when a thread is needed for a relatively short time. Thread pooling allows a thread to be assigned to a task and, when the task completes, to be recycled for use in another task. Because threads in the pool are already up and running, response time is usually reduced. The number of threads in the pool can be fixed to an upper limit to prevent a sudden overloading of the application.
I showed you how to create a generic pool of threads to execute the run() method of objects that implement the Runnable interface. Then, I showed you how to create a specialized pool of threads to service HTTP requests . Both these techniques can be elaborated on to provide more specialized and robust solutions in your code.

Toc


Java Thread Programming
Java Thread Programming
ISBN: 0672315858
EAN: 2147483647
Year: 2005
Pages: 149
Authors: Paul Hyde

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net