public boolean awaitTermination(final long timeout, final TimeUnit unit) {
        Requires.requireNonNull(unit, "unit");

        try {
            if (this.threadLock.tryAcquire(timeout, unit)) {
                this.threadLock.release();
            }
        } catch (final InterruptedException ignored) {
            // ignored
        }

        return isTerminated();
    }
Remove a previous added {@link Runnable} as a shutdown hook.
jraft-core/src/main/java/com/alipay/sofa/jraft/util/concurrent/MpscSingleThreadExecutor.java