@Override public void runTasks(){
  LOGGER.debug("starting runTasks");
  Collection<AWTEvent> events=new ArrayList<AWTEvent>();
  for (AWTEvent event; (event=queue.poll()) != null; ) {
    events.add(event);
  }
  LatchCompletionSignal signal=new LatchCompletionSignal(events.size());
  this.signal=signal;
  for (  AWTEvent event : events) {
    LOGGER.debug("event unqueued: " + event);
    super.postEvent(event);
  }
  signal.await();
  this.signal=null;
  LOGGER.debug("finished runTasks");
}

@ Override public void runTasks ( ) { LOGGER . debug ( "starting runTasks" ) ; Collection < AWTEvent > events = new ArrayList < AWTEvent > ( ) ; for ( AWTEvent event ; ( event = queue . poll ( ) ) != null ; ) { events . add ( event ) ; } LatchCompletionSignal signal = new LatchCompletionSignal ( events . size ( ) ) ; this . signal = signal ; for ( AWTEvent event : events ) { LOGGER . debug ( "event unqueued: " + event ) ; super . postEvent ( event ) ; } signal . await ( ) ; this . signal = null ; LOGGER . debug ( "finished runTasks" ) ; }
executes all queued invocation events .
