@Override
    public final ChannelFuture close(ChannelPromise promise) {
        // We need to call runPendingTasks() before calling super.close() as there may be something in the queue
        // that needs to be run before the actual close takes place.
        runPendingTasks();
        ChannelFuture future = super.close(promise);

        // Now finish everything else and cancel all scheduled tasks that were not ready set.
        finishPendingTasks(true);
        return future;
    }
Release all buffered outbound messages and return {@code true} if any were in the outbound buffer, {@code false}
otherwise.
plc4j/transports/test/src/main/java/io/netty/channel/embedded/Plc4xEmbeddedChannel.java