 |
Thread pooling helps to save the VM the work of creating and
destroying threads when they can be easily recycled. |
 |
Thread pooling reduces response time since the worker thread
is already created, started, and running. It is only waiting
for the signal to go! |
 |
Thread pooling holds resource usage to a predetermined, upper
limit. Instead of starting a new thread for every request
received by an HTTP server, a set of workers is available to
service requests. When this set is being completely used by
other requests, the server does not increase its load, but
rejects requests until a worker becomes available. |
 |
Thread pooling generally works best when a thread is only
needed for a brief period of time. |
 |
When using the thread pooling technique, care must be taken
to reasonably ensure that threads don't become deadlocked or
die. |
|