code: private void unsafeSendRequest(final ChannelHandlerContext ctx,
                                   final ByteBuf request,
                                   final Promise<DcpResponse> promise) {
      if (!ctx.executor().inEventLoop()) {
        throw new IllegalStateException("Must not be called outside event loop");
      }
  
      try {
        final int opaque = nextOpaque++;
        MessageUtil.setOpaque(opaque, request);
  
        // Don't need to be notified if/when the bytes are written,
        // so use void promise to save an allocation.
        ctx.writeAndFlush(request, ctx.voidPromise());
  
        outstandingRequests.add(new OutstandingRequest(opaque, promise));
  
      } catch (Throwable t) {
        promise.setFailure(t);
      }
    }
docs: Writes the request to the channel and records the promise in the
  outstanding request queue.
  <p>
  "Unsafe" because this method must only be called in the event loop thread,
  to ensure it never runs concurrently with {@link #channelInactive},
  and so that outstanding requests are enqueued in the same order
  they are written to the channel.