Replace CountDownLatch with AtomicBoolean as a flag for stopping job execution.