When you implement a simple concurrent application, you create and execute a thread per concurrent task. This approach can have some important issues. Since Java version 5, the Java concurrency API has included the Executor framework to improve the performance of concurrent applications with a lot of concurrent tasks. In this chapter, we will cover the following:
- An introduction to executors
- The first example - the k-nearest neighbors algorithm
- The second example - concurrency in a client/server environment