Markus 5ce932ceb7 Work on #213
- properly categorize all patterns
- remove pattern list from readme
- minor fixes to readme
- removed "introduction" because its not a pattern and an error i
committed some time ago
2015-08-20 21:40:07 +02:00

676 B

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Thread Pool thread-pool /patterns/thread-pool/ Concurrency Java

Intent: It is often the case that tasks to be executed are short-lived and the number of tasks is large. Creating a new thread for each task would make the system spend more time creating and destroying the threads than executing the actual tasks. Thread Pool solves this problem by reusing existing threads and eliminating the latency of creating new threads.

alt text

Applicability: Use the Thread Pool pattern when

  • you have a large number of short-lived tasks to be executed in parallel