2

I have some managers that execute different tasks and I need that this tasks are executed in background to keep the main Thread free. So, I'm using 3 threads and communicating them with handlers (with a main manager). I've read about the ThreadPoolExecutor and I was thinking about the benefits of this class against my actual implementation.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Jaime Alcántara Arnela
  • 2,062
  • 5
  • 25
  • 56

1 Answers1

2

ThreadPoolExecutor is an ExecutorService that execute each task on a thread auto managed by him.ExecutorService is a high level API and more easy to managed.

In addition, there are several types of ExecutorService that you can invoke through Executors factory.

You can view more about Executor on this thread: How to properly use Java Executor?

Óscar
  • 809
  • 1
  • 8
  • 33