public void preQueue(Runnable func){
synchronized (preEvents) {
    preEvents.add(func);
  }
}

public void preQueue ( Runnable func ) { synchronized ( preEvents ) { preEvents . add ( func ) ; } }
queues an event to be executed .
