code: public ChannelFuture removeAndWrite() {
          assert ctx.executor().inEventLoop();
          PendingWrite write = head;
          if (write == null) {
              return null;
          }
          Object msg = write.msg;
          ChannelPromise promise = write.promise;
          recycle(write, true);
          return ctx.write(msg, promise);
      }
docs: Removes a pending write operation and performs it via
  {@link ChannelHandlerContext#write(Object, ChannelPromise)}.
  
  @return  {@link ChannelFuture} if something was written and {@code null}
  if the {@link PendingWriteQueue} is empty.