private void closeAsync(CompletableFuture<?> future) {
        stop(null).handle((result, cause) -> {
            if (cause != null) {
                future.completeExceptionally(cause);
            } else {
                future.complete(null);
            }
            return null;
        });
    }
Begins the shutdown procedure by calling {@link #doStop(Object)}, ensuring that neither
{@link #doStart(Object)} nor {@link #doStop(Object)} is invoked concurrently.

@param arg the argument to pass to {@link #doStop(Object)}, or {@code null} to pass no argument.
core/src/main/java/com/linecorp/armeria/common/util/StartStopSupport.java