Improved performance - no need to check 'threadPool.isTerminated()' too
often. Removed not used var.