private void finishPendingTasks(boolean cancel) {
        runPendingTasks();
        if (cancel) {
            // Cancel all scheduled tasks that are left.
            loop.cancelScheduledTasks();
        }
    }
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