@UnstableApi
    @Override
    public void hook(Supplier<? extends AutoCloseable> contextHook) {
        requireNonNull(contextHook, "contextHook");

        if (contextHook == NOOP_CONTEXT_HOOK) {
            return;
        }

        for (;;) {
            final Supplier<? extends AutoCloseable> oldContextHook = this.contextHook;
            final Supplier<? extends AutoCloseable> newContextHook = mergeHooks(oldContextHook, contextHook);
            if (contextHookUpdater.compareAndSet(this, oldContextHook, newContextHook)) {
                break;
            }
        }
    }
Adds a hook which is invoked whenever this {@link NonWrappingRequestContext} is pushed to the
{@link RequestContextStorage}. The {@link AutoCloseable} returned by {@code contextHook} will be called
whenever this {@link RequestContext} is popped from the {@link RequestContextStorage}.
This method is useful when you need to propagate a custom context in this {@link RequestContext}'s scope.

<p>Note that this operation is highly performance-sensitive operation, and thus
it's not a good idea to run a time-consuming task.
core/src/main/java/com/linecorp/armeria/internal/common/NonWrappingRequestContext.java