code: public void execute() {
      Entry head;
      synchronized(this) {
        head = this.head;
        this.head = null;
      }
      while (head != null) {
        try {
          head.runnable.run();
        } catch (Throwable t) {
          platform.reportError("Failure executing runnable: " + head.runnable, t);
        }
        head = head.next;
      }
    }
docs: Executes all pending runnables (in the order they were added).