private CancellationTask newCancellationTask() {
        return cause -> {
            if (ch.eventLoop().inEventLoop()) {
                try (SafeCloseable ignored = RequestContextUtil.pop()) {
                    failAndReset(cause);
                }
            } else {
                ch.eventLoop().execute(() -> failAndReset(cause));
            }
        };
    }
Invoked on each write of an {@link HttpObject}.
core/src/main/java/com/linecorp/armeria/client/AbstractHttpRequestHandler.java