code: void enqueue(Runnable runnable, boolean flush) {
      queue.add(new RunnableCommand(runnable));
      if (flush) {
        scheduleFlush();
      }
    }
docs: Enqueue the runnable. It is not safe for another thread to queue an Runnable directly to the
  event loop, because it will be out-of-order with writes. This method allows the Runnable to be
  processed in-order with writes.