private boolean aliveTooLong(long started) {
        if (maxAliveTimeSeconds < 0) {
            return false;
        }
        double elapsedSeconds = (double) (System.currentTimeMillis() - started) / (double) 1000;
        return elapsedSeconds > (double) maxAliveTimeSeconds;
    }
This is used instead of awaitTermination(), because that interrupts
the thread and then waits for its termination.  This politely waits.

@param causeForTermination reason for termination.
tika-batch/src/main/java/org/apache/tika/batch/BatchProcess.java