Use executor service and thread pool instead of manually executing threads. First step of diagnosing non-termination problem.