Summary

Chapter 13 - Thread Pooling

Java Thread Programming
Paul Hyde
  Copyright 1999 Sams Publishing

Chapter 13: Thread Pooling
Overview
When design situations arise that could benefit by using many short-lived threads, thread pooling is a useful technique. Rather than create a brand new thread for each task, you can have one of the threads from the thread pool pulled out of the pool and assigned to the task. When the thread is finished with the task, it adds itself back to the pool and waits for another assignment.
In this chapter, I present two examples that use thread pooling. One creates a pool of threads that can be generically used to run Runnable objects. The other creates a pool of threads for servicing requests that come into a simple Hypertext Transfer Protocol (HTTP) server (a Web page server).

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